Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Real-time speech transcription using OpenAI's Realtime API - a demonstration of realtime transcription
- Real-time Transcription: Live speech-to-text conversion as you speak
- Language Support: Transcribe in multiple languages (English, Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Korean)
- Delay Setting: Control transcription latency
This app uses OpenAI's Realtime API in transcription-only mode:
- Your voice is captured via WebRTC
- Audio is streamed to OpenAI's transcription service
- Transcriptions are returned in real-time
- Click "Start" to begin transcription
- Allow microphone access when prompted
- Start speaking - transcriptions appear in real-time
- Click "Stop" to end the session
GET /- Serves the transcription interfacePOST /rtc- Creates a WebRTC transcription sessionPOST /observer/:callId- WebSocket observer for transcription events
Set in your Val Town environment:
OPENAI_API_KEY- Your OpenAI API key (required)
# Install Deno curl -fsSL https://deno.land/install.sh | sh # Run locally deno run --allow-all main.tsx
- Fork/remix this val on Val Town
- Add your
OPENAI_API_KEYto Val Town secrets - Your app will be available at
https://[your-val-name].val.run