[
  {
    "id": "CF_START",
    "type": "boundary",
    "name": "Start",
    "goTo": {"default": "node.configure"}
  },
  {
    "id": "node.configure",
    "type": "configure",
    "name": "Configure",
    "configureParams": {
      "resourceLanguage": "en-US",
      "speechRecognitionEngine": "apple",
      "speechRecognitionLocale": "en-US",
      "audioOutput": "speaker",
      "audioProcessingMode": "conversational",
      "runtimeFields": [{"name": "CollectedName", "value": ""}]
    },
    "goTo": {"default": "node.askName"}
  },
  {
    "id": "node.askName",
    "type": "interactiveCapture",
    "name": "Ask Name",
    "interactiveCapture": {
      "dialogPrompts": [
        {"type": "initial", "playbackMode": "sequence", "recognizeWhilePlaying": true, "promptID": "pm.askName"},
        {
          "type": "unrecognized",
          "playbackMode": "sequence",
          "recognizeWhilePlaying": true,
          "promptID": "pm.nameDidntUnderstand"
        },
        {"type": "timeout", "playbackMode": "sequence", "recognizeWhilePlaying": true, "promptID": "pm.nameTimeout"}
      ],
      "retryLimits": {"timeout": 2, "unrecognized": 2, "recognitionError": 1, "totalRetry": 3}
    },
    "speechRecognition": {
      "speechRecognitionEngine": "apple",
      "speechRecognitionLocale": "en-US",
      "task": {
        "taskID": "name",
        "taskHint": "dictation",
        "reportPartialResults": true,
        "autoPunctuate": false,
        "onDeviceRecognition": false
      }
    },
    "audioRecording": {
      "voiceActivityDetection": {
        "enabled": true,
        "minimumSpeechDurationMs": 200,
        "minimumSilenceDurationMs": 500,
        "sensitivity": "low",
        "trimSilence": false,
        "saveUntrimmedAudio": false
      },
      "stopConditions": {
        "maximumAudioDurationMs": 15000,
        "maximumSpeechDurationMs": 10000,
        "maximumPreSpeechSilenceMs": 5000,
        "maximumPostSpeechSilenceMs": 1200
      },
      "recordingPlayback": {
        "recordWhilePlaying": true,
        "stopPlaybackWhenSpeechDetected": true,
        "stopPlaybackWhenValidHypothesis": false,
        "includePartialHypothesis": true
      }
    },
    "goTo": {
      "default": "node.askContinue",
      "timeoutLimitReached": "node.failed",
      "unrecognizedLimitReached": "node.failed",
      "recognitionErrorLimitReached": "node.failed",
      "totalRetryLimitReached": "node.failed"
    }
  },
  {
    "id": "node.askContinue",
    "type": "interactiveCapture",
    "name": "Ask Continue",
    "interactiveCapture": {
      "unmatchedInputIsUnrecognized": true,
      "dialogPrompts": [
        {"type": "initial", "playbackMode": "sequence", "recognizeWhilePlaying": true, "promptID": "pm.askContinue"},
        {
          "type": "unrecognized",
          "playbackMode": "sequence",
          "recognizeWhilePlaying": true,
          "promptID": "pm.yesNoDidntUnderstand"
        },
        {
          "type": "timeout",
          "playbackMode": "sequence",
          "recognizeWhilePlaying": true,
          "promptID": "pm.yesNoTimeout"
        }
      ],
      "retryLimits": {"timeout": 2, "unrecognized": 2, "recognitionError": 1, "totalRetry": 3}
    },
    "speechRecognition": {
      "speechRecognitionEngine": "apple",
      "speechRecognitionLocale": "en-US",
      "task": {
        "taskID": "yesNo",
        "taskHint": "dictation",
        "reportPartialResults": true,
        "autoPunctuate": false,
        "onDeviceRecognition": false
      }
    },
    "audioRecording": {
      "voiceActivityDetection": {
        "enabled": true,
        "minimumSpeechDurationMs": 200,
        "minimumSilenceDurationMs": 500,
        "sensitivity": "low",
        "trimSilence": false,
        "saveUntrimmedAudio": false
      },
      "stopConditions": {
        "maximumAudioDurationMs": 10000,
        "maximumSpeechDurationMs": 6000,
        "maximumPreSpeechSilenceMs": 5000,
        "maximumPostSpeechSilenceMs": 1000
      },
      "recordingPlayback": {
        "recordWhilePlaying": true,
        "stopPlaybackWhenSpeechDetected": true,
        "stopPlaybackWhenValidHypothesis": false,
        "includePartialHypothesis": true
      }
    },
    "goTo": {
      "default": "node.failed",
      "timeoutLimitReached": "node.failed",
      "unrecognizedLimitReached": "node.failed",
      "recognitionErrorLimitReached": "node.failed",
      "totalRetryLimitReached": "node.failed",
      "userInputTransitions": [
        {"comparator": "starts", "input": "yes", "goTo": "node.explainSpeechTiles"},
        {"comparator": "starts", "input": "yeah", "goTo": "node.explainSpeechTiles"},
        {"comparator": "starts", "input": "sure", "goTo": "node.explainSpeechTiles"},
        {"comparator": "starts", "input": "no", "goTo": "node.goodbyeNo"}
      ]
    }
  },
  {
    "id": "node.explainSpeechTiles",
    "type": "audioPlayback",
    "name": "Explain SpeechTiles",
    "audioPlayback": {"promptID": "pm.explainSpeechTiles"},
    "goTo": {"default": "node.goodbyeYes"}
  },
  {
    "id": "node.goodbyeYes",
    "type": "audioPlayback",
    "name": "Goodbye",
    "audioPlayback": {"promptID": "pm.goodbyeYes"},
    "goTo": {"default": "CF_END"}
  },
  {
    "id": "node.goodbyeNo",
    "type": "audioPlayback",
    "name": "Goodbye",
    "audioPlayback": {"promptID": "pm.goodbyeNo"},
    "goTo": {"default": "CF_END"}
  },
  {
    "id": "node.failed",
    "type": "audioPlayback",
    "name": "Conversation Failed",
    "audioPlayback": {"promptID": "pm.couldNotGetName"},
    "goTo": {"default": "CF_END"}
  },
  {
    "id": "CF_END",
    "type": "boundary",
    "name": "End",
    "goTo": {"default": ""}
  }
]
