for backwards compatibility in gather/transcribe return only 1 alternative at top level (#240)

This commit is contained in:
Dave Horton
2023-02-02 12:58:22 -05:00
committed by GitHub
parent f9921cf4e9
commit c37fba541f
3 changed files with 6 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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

View File

@@ -44,7 +44,7 @@ services:
drachtio:
image: drachtio/drachtio-server:latest
restart: always
command: drachtio --contact "sip:*;transport=udp,tcp" --address 0.0.0.0 --port 9022
command: drachtio --contact "sip:*;transport=udp" --mtu 4096 --address 0.0.0.0 --port 9022
ports:
- "9060:9022/tcp"
networks: