A Speech-to-Text Playground is now available in Mission Control, letting you test and compare STT providers directly from the portal. Transcribe audio from your microphone or upload a file, with no API integration required.
import asyncio import websockets import json async def transcribe(api_key, audio_file, engine="Telnyx"): url = f"wss://api.telnyx.com/v2/speech-to-text/transcription?transcription_engine={engine}&input_format=wav" headers = {"Authorization": f"Bearer {api_key}"} async with websockets.connect(url, extra_headers=headers) as ws: with open(audio_file, "rb") as f: while chunk := f.read(2048): await ws.send(chunk) await asyncio.sleep(0.1) await asyncio.sleep(3) response = await ws.recv() print(json.loads(response)["transcript"]) asyncio.run(transcribe("YOUR_API_KEY", "audio.wav"))
Learn more in the STT WebSocket Streaming docs or the Speech-to-Text API product page.