Skip to content

Commit e976fb8

Browse files
committed
STTv2 (Scribe v2 Realtime) support
- Add STTv2 class with full Scribe v2 Realtime API support - Support word-level timestamps (include_timestamps parameter) - Support both VAD and manual commit strategies - Emit INTERIM_TRANSCRIPT events for real-time UI feedback - Handle committed_transcript_with_timestamps events - Add update_options() method for dynamic reconfiguration - Comprehensive error handling and logging - Full docstrings with examples
1 parent 7ef97cf commit e976fb8

File tree

3 files changed

+771
-1
lines changed

3 files changed

+771
-1
lines changed

livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@
1717
See https://docs.livekit.io/agents/integrations/tts/elevenlabs/ for more information.
1818
"""
1919

20-
from .models import TTSEncoding, TTSModels
20+
from .models import STTAudioFormat, STTModels, TTSEncoding, TTSModels
2121
from .stt import STT
22+
from .stt_v2 import SpeechStreamv2, STTv2
2223
from .tts import DEFAULT_VOICE_ID, TTS, Voice, VoiceSettings
2324
from .version import __version__
2425

2526
__all__ = [
2627
"STT",
28+
"STTv2",
29+
"SpeechStreamv2",
2730
"TTS",
2831
"Voice",
2932
"VoiceSettings",
3033
"TTSEncoding",
3134
"TTSModels",
35+
"STTModels",
36+
"STTAudioFormat",
3237
"DEFAULT_VOICE_ID",
3338
"__version__",
3439
]

livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/models.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@
2020
"mp3_44100_128",
2121
"mp3_44100_192",
2222
]
23+
24+
STTModels = Literal["scribe_v2_realtime",]
25+
26+
STTAudioFormat = Literal[
27+
"pcm_8000",
28+
"pcm_16000",
29+
"pcm_22050",
30+
"pcm_24000",
31+
"pcm_44100",
32+
"pcm_48000",
33+
"ulaw_8000",
34+
]

0 commit comments

Comments
 (0)