mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
fix transcribe fixes for speechmatics (#978)
* fix transcribe fixes for speechmatics * update to verb-specs with fixes for speechmatics * add support for speechmatics translation * add handlers for receiving translations * call translation hookd * gather: no need to restart speechmatics after a final transcript during continuous asr * graceful shutdown * wip * wip * wip * wip * wip
This commit is contained in:
@@ -109,6 +109,8 @@ const stickyVars = {
|
||||
'SPEECHMATICS_HOST',
|
||||
'SPEECHMATICS_PATH',
|
||||
'SPEECHMATICS_SPEECH_HINTS',
|
||||
'SPEECHMATICS_TRANSLATION_LANGUAGES',
|
||||
'SPEECHMATICS_TRANSLATION_PARTIALS'
|
||||
]
|
||||
};
|
||||
|
||||
@@ -937,11 +939,18 @@ module.exports = (logger) => {
|
||||
};
|
||||
}
|
||||
else if ('speechmatics' === vendor) {
|
||||
const {speechmaticsOptions = {}} = rOpts;
|
||||
opts = {
|
||||
...opts,
|
||||
...(sttCredentials.api_key) && {SPEECHMATICS_API_KEY: sttCredentials.api_key},
|
||||
...(sttCredentials.speechmatics_stt_uri) && {SPEECHMATICS_HOST: sttCredentials.speechmatics_stt_uri},
|
||||
...(rOpts.hints?.length > 0 && {SPEECHMATICS_SPEECH_HINTS: rOpts.hints.join(',')}),
|
||||
...(speechmaticsOptions.translation_config &&
|
||||
{
|
||||
SPEECHMATICS_TRANSLATION_LANGUAGES: speechmaticsOptions.translation_config.target_languages.join(','),
|
||||
SPEECHMATICS_TRANSLATION_PARTIALS: speechmaticsOptions.translation_config.enable_partials ? 1 : 0
|
||||
}
|
||||
),
|
||||
};
|
||||
}
|
||||
else if (vendor.startsWith('custom:')) {
|
||||
|
||||
Reference in New Issue
Block a user