@fonoster/apiserver 0.9.42 → 0.9.45
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/index.js +0 -0
- package/dist/voice/stt/Deepgram.js +5 -1
- package/dist/voice/stt/types.d.ts +2 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
File without changes
|
|
@@ -203,6 +203,8 @@ class Deepgram extends AbstractSpeechToText_1.AbstractSpeechToText {
|
|
|
203
203
|
}
|
|
204
204
|
static getConfigValidationSchema() {
|
|
205
205
|
return z.object({
|
|
206
|
+
smartFormat: z.boolean().optional(),
|
|
207
|
+
noDelay: z.boolean().optional(),
|
|
206
208
|
languageCode: z
|
|
207
209
|
.nativeEnum(common_1.VoiceLanguage, {
|
|
208
210
|
message: common_1.Messages.VALID_LANGUAGE_CODE
|
|
@@ -221,5 +223,7 @@ class Deepgram extends AbstractSpeechToText_1.AbstractSpeechToText {
|
|
|
221
223
|
}
|
|
222
224
|
exports.Deepgram = Deepgram;
|
|
223
225
|
function buildTranscribeConfig(config) {
|
|
224
|
-
return Object.assign(Object.assign({}, config), { model: config.model || types_1.DeepgramModel.NOVA_2_PHONECALL, encoding: "linear16", sample_rate: 16000,
|
|
226
|
+
return Object.assign(Object.assign({}, config), { model: config.model || types_1.DeepgramModel.NOVA_2_PHONECALL, language: config.languageCode || common_1.VoiceLanguage.EN_US, encoding: "linear16", sample_rate: 16000, channels: 1, smart_format: config.smartFormat || true,
|
|
227
|
+
// This needs to be set to true to avoid delays while using smart_format
|
|
228
|
+
no_delay: config.noDelay || true });
|
|
225
229
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/apiserver",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.45",
|
|
4
4
|
"description": "APIServer for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"@types/uuid": "^10.0.0",
|
|
74
74
|
"@types/validator": "^13.12.0"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "d8e42a75f1ad821054ef4142559d1102f2e1314d"
|
|
77
77
|
}
|