Commit c7018fc
committed
fix(deepgram): sync missing STT/TTS API params, fix duplicate languages, add TTS model list
**models.py**
- Add `nova-2-atc`, `nova-3-multilingual` to `DeepgramModels`
Ref: https://developers.deepgram.com/docs/models-languages-overview
- Promote `flux-general-en` into `DeepgramModels` (was only in `V2Models`)
- Remove duplicate entries in `DeepgramLanguages` (hi, pt, pt-BR, sv each
appeared multiple times due to copy-paste artifact)
- Add `TTSModels` Literal with all Aura-2 and Aura-1 voice names
Ref: https://developers.deepgram.com/docs/tts-models
**stt.py**
- Add `utterance_end_ms` (int | None): silence duration to emit UtteranceEnd;
requires interim_results=True
Ref: https://developers.deepgram.com/reference/speech-to-text/listen-streaming#query-utterance_end_ms
- Add `dictation` (bool): converts spoken punctuation commands into marks
Ref: https://developers.deepgram.com/reference/speech-to-text/listen-streaming#query-dictation
- Add `redact` (list[str]): redact PCI/PII/SSN from transcripts
Ref: https://developers.deepgram.com/reference/speech-to-text/listen-streaming#query-redact
- Add `replace` (dict[str, str]): term replacement in transcripts
Ref: https://developers.deepgram.com/reference/speech-to-text/listen-streaming#query-replace
- Add `search` (list[str]): highlight search terms with confidence scores
Ref: https://developers.deepgram.com/reference/speech-to-text/listen-streaming#query-search
- Handle `UtteranceEnd` event in `_process_stream_event` to emit END_OF_SPEECH
**tts.py**
- Add `bit_rate` (int | None): for compressed encodings (e.g. mp3)
Ref: https://developers.deepgram.com/reference/text-to-speech-api#query-bit_rate
- Use `TTSModels | str` as model type
- Expand `update_options` to include `encoding`, `sample_rate`, `bit_rate`
**_utils.py**
- Handle `replace` dict in `_to_deepgram_url` by encoding as "term:replacement" pairs,
consistent with how `keywords` are encoded1 parent ed82dbd commit c7018fc
5 files changed
Lines changed: 209 additions & 31 deletions
File tree
- livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
28 | 39 | | |
29 | 40 | | |
30 | 41 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
Lines changed: 74 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 61 | + | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 76 | | |
| 77 | + | |
| 78 | + | |
82 | 79 | | |
83 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
Lines changed: 81 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
103 | 113 | | |
104 | 114 | | |
105 | 115 | | |
| |||
130 | 140 | | |
131 | 141 | | |
132 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
133 | 158 | | |
134 | 159 | | |
135 | 160 | | |
| |||
185 | 210 | | |
186 | 211 | | |
187 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
188 | 218 | | |
189 | 219 | | |
190 | 220 | | |
| |||
298 | 328 | | |
299 | 329 | | |
300 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
301 | 336 | | |
302 | 337 | | |
303 | 338 | | |
| |||
342 | 377 | | |
343 | 378 | | |
344 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
345 | 390 | | |
346 | 391 | | |
347 | 392 | | |
| |||
361 | 406 | | |
362 | 407 | | |
363 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
364 | 414 | | |
365 | 415 | | |
366 | 416 | | |
| |||
432 | 482 | | |
433 | 483 | | |
434 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
435 | 490 | | |
436 | 491 | | |
437 | 492 | | |
| |||
476 | 531 | | |
477 | 532 | | |
478 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
479 | 544 | | |
480 | 545 | | |
481 | 546 | | |
| |||
617 | 682 | | |
618 | 683 | | |
619 | 684 | | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
620 | 695 | | |
621 | 696 | | |
622 | 697 | | |
| |||
716 | 791 | | |
717 | 792 | | |
718 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
719 | 800 | | |
720 | 801 | | |
721 | 802 | | |
| |||
0 commit comments