@fonoster/apiserver 0.9.42 → 0.9.44

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 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, language: config.languageCode || common_1.VoiceLanguage.EN_US, smart_format: true });
226
+ 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: 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
  }
@@ -49,6 +49,8 @@ type DeepgramSttConfig = {
49
49
  config: {
50
50
  languageCode: VoiceLanguage;
51
51
  model: DeepgramModel;
52
+ smartFormat: boolean;
53
+ noDelay: boolean;
52
54
  };
53
55
  credentials: {
54
56
  apiKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/apiserver",
3
- "version": "0.9.42",
3
+ "version": "0.9.44",
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": "1ceb629d4fd0035bf56d24580e5c6c3d21568293"
76
+ "gitHead": "988ede3d3b0443e04d5c2230855d8d5473349faf"
77
77
  }