@absolutejs/voice-deepgram 0.0.16 → 0.0.17
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 +3 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2332,6 +2332,7 @@ var openConnection = (client, config, liveOptions) => {
|
|
|
2332
2332
|
var deepgram = (config) => ({
|
|
2333
2333
|
kind: "stt",
|
|
2334
2334
|
open: (options) => {
|
|
2335
|
+
const emitsNativeEndOfTurn = String(config.model).startsWith("flux");
|
|
2335
2336
|
const client = createClient(config.apiKey, {
|
|
2336
2337
|
global: {
|
|
2337
2338
|
websocket: {
|
|
@@ -2366,7 +2367,7 @@ var deepgram = (config) => ({
|
|
|
2366
2367
|
});
|
|
2367
2368
|
connection.on(LiveTranscriptionEvents.Transcript, (payload) => {
|
|
2368
2369
|
const type = typeof payload.type === "string" ? payload.type : "Results";
|
|
2369
|
-
if (type === "UtteranceEnd" || type === "EndOfTurn" || type === "EagerEndOfTurn") {
|
|
2370
|
+
if (emitsNativeEndOfTurn && (type === "UtteranceEnd" || type === "EndOfTurn" || type === "EagerEndOfTurn")) {
|
|
2370
2371
|
emit(listeners, "endOfTurn", {
|
|
2371
2372
|
receivedAt: Date.now(),
|
|
2372
2373
|
reason: "vendor",
|
|
@@ -2400,7 +2401,7 @@ var deepgram = (config) => ({
|
|
|
2400
2401
|
type: "partial"
|
|
2401
2402
|
});
|
|
2402
2403
|
}
|
|
2403
|
-
if (payload.speech_final === true) {
|
|
2404
|
+
if (emitsNativeEndOfTurn && payload.speech_final === true) {
|
|
2404
2405
|
emit(listeners, "endOfTurn", {
|
|
2405
2406
|
receivedAt: Date.now(),
|
|
2406
2407
|
reason: "vendor",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/voice-deepgram",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "Deepgram speech-to-text adapter for @absolutejs/voice",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"typecheck": "bun run tsc --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@absolutejs/voice": "0.0.
|
|
31
|
+
"@absolutejs/voice": "0.0.15",
|
|
32
32
|
"@deepgram/sdk": "^4.11.2",
|
|
33
33
|
"ws": "^8.18.3"
|
|
34
34
|
},
|