@fonoster/apiserver 0.9.30 → 0.9.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/db.d.ts +2 -2
- package/dist/voice/stt/Deepgram.js +9 -7
- package/package.json +6 -6
package/dist/core/db.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ declare const prisma: import("@prisma/client/runtime/library").DynamicClientExte
|
|
|
3
3
|
model: {};
|
|
4
4
|
query: {};
|
|
5
5
|
client: {};
|
|
6
|
-
}, import(".prisma/client").Prisma.
|
|
6
|
+
}, {}>, import(".prisma/client").Prisma.TypeMapCb<import(".prisma/client").Prisma.PrismaClientOptions>, {
|
|
7
7
|
result: {};
|
|
8
8
|
model: {};
|
|
9
9
|
query: {};
|
|
10
10
|
client: {};
|
|
11
|
-
}
|
|
11
|
+
}>;
|
|
12
12
|
type Prisma = typeof prisma;
|
|
13
13
|
export { Prisma, prisma };
|
|
@@ -97,6 +97,10 @@ class Deepgram extends AbstractSpeechToText_1.AbstractSpeechToText {
|
|
|
97
97
|
1000) /
|
|
98
98
|
words.length
|
|
99
99
|
: 0;
|
|
100
|
+
logger.verbose("transcribe result", {
|
|
101
|
+
speech: data.channel.alternatives[0].transcript,
|
|
102
|
+
responseTime
|
|
103
|
+
});
|
|
100
104
|
out.emit("data", {
|
|
101
105
|
speech: data.channel.alternatives[0].transcript,
|
|
102
106
|
responseTime
|
|
@@ -125,6 +129,10 @@ class Deepgram extends AbstractSpeechToText_1.AbstractSpeechToText {
|
|
|
125
129
|
isFinal: true,
|
|
126
130
|
responseTime: performance.now() - startTime
|
|
127
131
|
};
|
|
132
|
+
logger.verbose("transcribe result", {
|
|
133
|
+
speech: result.speech,
|
|
134
|
+
responseTime: result.responseTime
|
|
135
|
+
});
|
|
128
136
|
resolve(result);
|
|
129
137
|
connection.destroy();
|
|
130
138
|
}
|
|
@@ -164,11 +172,5 @@ class Deepgram extends AbstractSpeechToText_1.AbstractSpeechToText {
|
|
|
164
172
|
}
|
|
165
173
|
exports.Deepgram = Deepgram;
|
|
166
174
|
function buildTranscribeConfig(config) {
|
|
167
|
-
return {
|
|
168
|
-
model: config.model || types_1.DeepgramModel.NOVA_2_PHONECALL,
|
|
169
|
-
encoding: "linear16",
|
|
170
|
-
sample_rate: 16000,
|
|
171
|
-
language: config.languageCode || common_1.VoiceLanguage.EN_US,
|
|
172
|
-
smart_format: true
|
|
173
|
-
};
|
|
175
|
+
return Object.assign(Object.assign({}, config), { model: config.model || types_1.DeepgramModel.NOVA_2_PHONECALL, encoding: "linear16", sample_rate: 16000, language: config.languageCode || common_1.VoiceLanguage.EN_US, smart_format: true });
|
|
174
176
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/apiserver",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.35",
|
|
4
4
|
"description": "APIServer for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@deepgram/sdk": "^3.5.1",
|
|
24
|
-
"@fonoster/authz": "^0.9.
|
|
25
|
-
"@fonoster/common": "^0.9.
|
|
26
|
-
"@fonoster/identity": "^0.9.
|
|
24
|
+
"@fonoster/authz": "^0.9.35",
|
|
25
|
+
"@fonoster/common": "^0.9.35",
|
|
26
|
+
"@fonoster/identity": "^0.9.35",
|
|
27
27
|
"@fonoster/logger": "^0.9.30",
|
|
28
|
-
"@fonoster/sipnet": "^0.9.
|
|
28
|
+
"@fonoster/sipnet": "^0.9.35",
|
|
29
29
|
"@fonoster/streams": "^0.9.30",
|
|
30
30
|
"@fonoster/types": "^0.9.30",
|
|
31
31
|
"@google-cloud/speech": "^6.6.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"@types/uuid": "^10.0.0",
|
|
74
74
|
"@types/validator": "^13.12.0"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "051baac1de8595a8d657022ee588d8cbb59f32ef"
|
|
77
77
|
}
|