diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index ebda4bfc..61f9569f 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -83,6 +83,7 @@ class TaskGather extends Task { this.initialSpeechTimeoutMs = recognizer.initialSpeechTimeoutMs || 0; this.azureServiceEndpoint = recognizer.azureServiceEndpoint; this.azureSttEndpointId = recognizer.azureSttEndpointId; + this.azureAudioLogging = recognizer.audioLogging; } else { this.hints = []; @@ -381,6 +382,7 @@ class TaskGather extends Task { else { opts.AZURE_SPEECH_ALTERNATIVE_LANGUAGE_CODES = ''; } + if (this.azureAudioLogging) opts.AZURE_AUDIO_LOGGING = 1; if (this.requestSnr) opts.AZURE_REQUEST_SNR = 1; if (this.profanityOption && this.profanityOption !== 'raw') opts.AZURE_PROFANITY_OPTION = this.profanityOption; if (this.azureServiceEndpoint) opts.AZURE_SERVICE_ENDPOINT = this.azureServiceEndpoint; diff --git a/lib/tasks/specs.json b/lib/tasks/specs.json index d1636e80..b2d6123c 100644 --- a/lib/tasks/specs.json +++ b/lib/tasks/specs.json @@ -509,7 +509,8 @@ "azureServiceEndpoint": "string", "azureSttEndpointId": "string", "asrDtmfTerminationDigit": "string", - "asrTimeout": "number" + "asrTimeout": "number", + "audioLogging": "boolean" }, "required": [ "vendor" diff --git a/lib/tasks/transcribe.js b/lib/tasks/transcribe.js index cb10c09b..bc205cad 100644 --- a/lib/tasks/transcribe.js +++ b/lib/tasks/transcribe.js @@ -55,6 +55,7 @@ class TaskTranscribe extends Task { this.initialSpeechTimeoutMs = recognizer.initialSpeechTimeoutMs || 0; this.azureServiceEndpoint = recognizer.azureServiceEndpoint; this.azureSttEndpointId = recognizer.azureSttEndpointId; + this.azureAudioLogging = recognizer.audioLogging; } get name() { return TaskName.Transcribe; } @@ -249,6 +250,7 @@ class TaskTranscribe extends Task { } if (this.altLanguages.length > 0) opts.AZURE_SPEECH_ALTERNATIVE_LANGUAGE_CODES = this.altLanguages.join(','); else opts.AZURE_SPEECH_ALTERNATIVE_LANGUAGE_CODES = ''; + if (this.azureAudioLogging) opts.AZURE_AUDIO_LOGGING = 1; if (this.requestSnr) opts.AZURE_REQUEST_SNR = 1; if (this.profanityOption !== 'raw') opts.AZURE_PROFANITY_OPTION = this.profanityOption; if (this.initialSpeechTimeoutMs > 0) opts.AZURE_INITIAL_SPEECH_TIMEOUT_MS = this.initialSpeechTimeoutMs;