Goal
Provide a maintained, copy-pasteable Python example that streams microphone audio to Listen V1 without adding microphone capture or platform audio dependencies to the core SDK.
Scope
- Add
examples/18-transcription-live-microphone.py using the optional sounddevice dependency.
- Explain installation, device selection, and audio format settings in the script.
- Read
DEEPGRAM_API_KEY from the environment and use DeepgramClient plus the public Listen V1 socket API.
- Send linear16 microphone bytes at the matching sample rate and channel count.
- Handle transcript, error, close, Ctrl-C, and CloseStream paths cleanly.
- Add the example to
examples/README.md.
Non-goals
- No microphone code, optional extra, or audio-device dependency in
deepgram-sdk.
- No cross-platform device abstraction beyond what sounddevice provides.
- No automatic reconnection or application-specific audio pipeline.
Acceptance
- The script imports only after the user installs
sounddevice.
- It runs against a real microphone with documented setup.
- It uses public SDK APIs only and does not expose credentials.
Goal
Provide a maintained, copy-pasteable Python example that streams microphone audio to Listen V1 without adding microphone capture or platform audio dependencies to the core SDK.
Scope
examples/18-transcription-live-microphone.pyusing the optionalsounddevicedependency.DEEPGRAM_API_KEYfrom the environment and useDeepgramClientplus the public Listen V1 socket API.examples/README.md.Non-goals
deepgram-sdk.Acceptance
sounddevice.