Skip to content

docs(examples): add microphone live transcription example #779

Description

@GregHolmes

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions