Skip to content

Commit 17a2404

Browse files
committed
refactor: restructure plugins by provider
1 parent 2cd0494 commit 17a2404

63 files changed

Lines changed: 2097 additions & 1661 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/llm_audio_conversation/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
from openai import OpenAI
2929

3030
from examples.utils import create_user, open_browser
31-
from getstream.plugins.stt.deepgram import Deepgram
32-
from getstream.plugins.tts.elevenlabs import ElevenLabs
33-
from getstream.plugins.vad.silero import Silero
31+
from getstream.plugins.deepgram import DeepgramSTT
32+
from getstream.plugins.elevenlabs import ElevenLabsTTS
33+
from getstream.plugins.silero import SileroVAD
3434
from getstream.stream import Stream
3535
from getstream.video import rtc
3636
from getstream.video.rtc import audio_track
@@ -73,11 +73,11 @@ async def main():
7373

7474
# Initialize components
7575
audio = audio_track.AudioStreamTrack(framerate=16000)
76-
vad = Silero()
77-
stt = Deepgram()
76+
vad = SileroVAD()
77+
stt = DeepgramSTT()
7878

7979
# Use "Arnold" voice - a default ElevenLabs voice available to all users
80-
tts_instance = ElevenLabs(voice_id="VR6AewLTigWG4xSOukaG") # ID of default voice
80+
tts_instance = ElevenLabsTTS(voice_id="VR6AewLTigWG4xSOukaG") # ID of default voice
8181
openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
8282
tts_instance.set_output_track(audio)
8383

examples/mcp/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from getstream.stream import Stream
55
from getstream.video import rtc
66
from getstream.video.call import Call
7-
from getstream.plugins.stt.deepgram import Deepgram
8-
from getstream.plugins.tts.elevenlabs import ElevenLabs
7+
from getstream.plugins.deepgram import DeepgramSTT
8+
from getstream.plugins.elevenlabs import ElevenLabsTTS
99
from getstream.video.rtc import audio_track
1010
from getstream.video.rtc.track_util import PcmData
1111
from examples.mcp.agent import chat_with_tools
@@ -20,8 +20,8 @@ async def run_bot(call: Call, bot_user_id: str):
2020
"""Join the call as a bot, convert speech→text, call MCP tools
2121
when the transcript is final, then speak the answer back."""
2222

23-
stt = Deepgram()
24-
tts = ElevenLabs()
23+
stt = DeepgramSTT()
24+
tts = ElevenLabsTTS()
2525
track = audio_track.AudioStreamTrack(framerate=16000)
2626
tts.set_output_track(track)
2727

examples/openai_realtime_speech_to_speech/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from examples.utils import create_user, open_browser
77
from getstream import Stream
88
from getstream.models import StartClosedCaptionsResponse
9-
from getstream.plugins.sts.openai_realtime import OpenAIRealtime
9+
from getstream.plugins.openai import OpenAIRealtime
1010

1111

1212
logging.basicConfig(

examples/stt_deepgram_transcription/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from getstream.stream import Stream
2525
from getstream.video import rtc
2626
from getstream.video.rtc.track_util import PcmData
27-
from getstream.plugins.stt.deepgram import Deepgram
27+
from getstream.plugins.deepgram import DeepgramSTT
2828
from examples.utils import create_user, open_browser
2929

3030
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
@@ -70,7 +70,7 @@ async def main():
7070
print("\nPress Ctrl+C to stop the transcription bot.\n")
7171

7272
# Initialize Deepgram STT (api_key comes from .env)
73-
stt = Deepgram()
73+
stt = DeepgramSTT()
7474

7575
try:
7676
async with await rtc.join(call, bot_user_id) as connection:

examples/stt_moonshine_transcription/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
import uuid
2424
from dotenv import load_dotenv
2525

26-
from getstream.plugins.vad.silero.vad import Silero
26+
from getstream.plugins.silero import SileroVAD
2727
from getstream.stream import Stream
2828
from getstream.video import rtc
2929
from getstream.video.rtc.track_util import PcmData
30-
from getstream.plugins.stt.moonshine import Moonshine
30+
from getstream.plugins.moonshine import MoonshineSTT
3131
from examples.utils import create_user, open_browser
3232

3333

@@ -64,11 +64,11 @@ async def main() -> None: # noqa: D401
6464
print("\n🤖 Starting transcription bot…")
6565
print("Speak in the browser and see transcripts below. Press Ctrl+C to stop.\n")
6666

67-
stt = Moonshine()
67+
stt = MoonshineSTT()
6868

6969
# Initialize Silero VAD for speech detection
7070
print("🔊 Initializing Silero VAD...")
71-
vad = Silero()
71+
vad = SileroVAD()
7272
print("✅ Audio processing pipeline ready: VAD → Moonshine STT")
7373

7474
try:

examples/tts_cartesia/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
from getstream.stream import Stream
3030
from getstream.video import rtc
3131
from getstream.video.rtc import audio_track
32-
from getstream.plugins.tts.cartesia import CartesiaTTS
33-
from getstream.video.rtc.pb.stream.video.sfu.models.models_pb2 import Participant
32+
from getstream.plugins.cartesia import CartesiaTTS
3433

3534

3635
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
@@ -86,7 +85,7 @@ def _on_participant_joined(p):
8685

8786
await someone_joined.wait() # blocks here until a listener is present
8887

89-
# Now its safe to speak – nothing will be lost
88+
# Now it's safe to speak – nothing will be lost
9089
await tts.send(greeting)
9190
logging.info("Sent greeting via TTS")
9291

examples/tts_elevenlabs/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from getstream.stream import Stream
3030
from getstream.video import rtc
3131
from getstream.video.rtc import audio_track
32-
from getstream.plugins.tts.elevenlabs import ElevenLabs
32+
from getstream.plugins.elevenlabs import ElevenLabsTTS
3333

3434

3535
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
@@ -60,7 +60,7 @@ async def main() -> None:
6060
open_browser(client.api_key, token, call_id)
6161

6262
track = audio_track.AudioStreamTrack(framerate=16000)
63-
tts = ElevenLabs() # API key picked from ELEVENLABS_API_KEY
63+
tts = ElevenLabsTTS() # API key picked from ELEVENLABS_API_KEY
6464
tts.set_output_track(track)
6565

6666
greeting = "Hello there! I'm an ElevenLabs T T S bot speaking inside this call. As this is a minimal example, I'll stop speaking now."

examples/vad_silero/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from getstream.stream import Stream
2929
from getstream.video import rtc
3030
from getstream.video.rtc.track_util import PcmData
31-
from getstream.plugins.vad.silero import Silero
31+
from getstream.plugins.silero import SileroVAD
3232

3333
# ---------------------------------------------------------------------------
3434
# Logging setup – INFO level so we see joins / leaves, etc.
@@ -63,7 +63,7 @@ async def main() -> None:
6363

6464
open_browser(client.api_key, token, call_id)
6565

66-
vad = Silero()
66+
vad = SileroVAD()
6767

6868
print("\n🤖 VAD bot starting – speak in the call and watch the console.\n")
6969

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from getstream.plugins.cartesia.tts import CartesiaTTS
2+
3+
__all__ = ["CartesiaTTS"]

0 commit comments

Comments
 (0)