mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
@@ -64,6 +64,16 @@ class CallSession extends Emitter {
|
||||
this.notifiedComplete = false;
|
||||
this.rootSpan = rootSpan;
|
||||
|
||||
this._origRecognizerSettings = {
|
||||
vendor: this.application?.speech_recognizer_vendor,
|
||||
language: this.application?.speech_recognizer_language,
|
||||
};
|
||||
this._origSynthesizerSettings = {
|
||||
vendor: this.application?.speech_synthesis_vendor,
|
||||
language: this.application?.speech_synthesis_language,
|
||||
voice: this.application?.speech_synthesis_voice,
|
||||
};
|
||||
|
||||
assert(rootSpan);
|
||||
|
||||
this._recordState = RecordState.RecordingOff;
|
||||
@@ -324,6 +334,22 @@ class CallSession extends Emitter {
|
||||
return this._globalSttPunctuation !== undefined;
|
||||
}
|
||||
|
||||
resetRecognizer() {
|
||||
this._globalSttHints = undefined;
|
||||
this._globalSttPunctuation = undefined;
|
||||
this._globalAltLanguages = undefined;
|
||||
this.isContinuousAsr = false;
|
||||
this.asrDtmfTerminationDigits = undefined;
|
||||
this.speechRecognizerLanguage = this._origRecognizerSettings.language;
|
||||
this.speechRecognizerVendor = this._origRecognizerSettings.vendor;
|
||||
}
|
||||
|
||||
resetSynthesizer() {
|
||||
this.speechSynthesisLanguage = this._origSynthesizerSettings.language;
|
||||
this.speechSynthesisVendor = this._origSynthesizerSettings.vendor;
|
||||
this.speechSynthesisVoice = this._origSynthesizerSettings.voice;
|
||||
}
|
||||
|
||||
async notifyRecordOptions(opts) {
|
||||
const {action} = opts;
|
||||
this.logger.debug({opts}, 'CallSession:notifyRecordOptions');
|
||||
@@ -680,6 +706,12 @@ class CallSession extends Emitter {
|
||||
stt_region: credential.stt_region
|
||||
};
|
||||
}
|
||||
else if ('nvidia' === vendor) {
|
||||
return {
|
||||
speech_credential_sid: credential.speech_credential_sid,
|
||||
riva_server_uri: credential.riva_server_uri
|
||||
};
|
||||
}
|
||||
else if (vendor.startsWith('custom:')) {
|
||||
return {
|
||||
speech_credential_sid: credential.speech_credential_sid,
|
||||
|
||||
Reference in New Issue
Block a user