mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
for backwards compatibility in gather/transcribe return only 1 alternative at top level (#240)
This commit is contained in:
@@ -166,7 +166,7 @@ class TaskConfig extends Task {
|
||||
|
||||
async kill(cs) {
|
||||
super.kill(cs);
|
||||
if (this.ep && this.stopAmd) this.stopAmd(this.ep, this);
|
||||
//if (this.ep && this.stopAmd) this.stopAmd(this.ep, this);
|
||||
}
|
||||
|
||||
_onAmdEvent(cs, evt) {
|
||||
|
||||
@@ -19,7 +19,7 @@ const normalizeDeepgram = (evt, channel, language) => {
|
||||
language_code: language,
|
||||
channel_tag: channel,
|
||||
is_final: evt.is_final,
|
||||
alternatives,
|
||||
alternatives: [alternatives[0]],
|
||||
vendor: {
|
||||
name: 'deepgram',
|
||||
evt: copy
|
||||
@@ -50,7 +50,7 @@ const normalizeGoogle = (evt, channel, language) => {
|
||||
language_code: language,
|
||||
channel_tag: channel,
|
||||
is_final: evt.is_final,
|
||||
alternatives: evt.alternatives,
|
||||
alternatives: [evt.alternatives[0]],
|
||||
vendor: {
|
||||
name: 'google',
|
||||
evt: copy
|
||||
@@ -64,7 +64,7 @@ const normalizeNuance = (evt, channel, language) => {
|
||||
language_code: language,
|
||||
channel_tag: channel,
|
||||
is_final: evt.is_final,
|
||||
alternatives: evt.alternatives,
|
||||
alternatives: [evt.alternatives[0]],
|
||||
vendor: {
|
||||
name: 'nuance',
|
||||
evt: copy
|
||||
@@ -92,7 +92,7 @@ const normalizeMicrosoft = (evt, channel, language) => {
|
||||
language_code,
|
||||
channel_tag: channel,
|
||||
is_final: evt.RecognitionStatus === 'Success',
|
||||
alternatives,
|
||||
alternatives: [alternatives[0]],
|
||||
vendor: {
|
||||
name: 'microsoft',
|
||||
evt: copy
|
||||
|
||||
Reference in New Issue
Block a user