Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

On this pageOverview

Speech-to-Text Commands

Shell
dg listen audio.mp3
Shell
dg listen https://example.com/audio.mp3

Stream from your default microphone:

Shell
dg listen --mic

Press Ctrl+C to stop.

Pipe audio from another tool:

Shell
ffmpeg -i video.mp4 -f s16le -ar 16000 -ac 1 - | dg listen --encoding linear16
Shell
dg -o json listen audio.mp3    # JSON
dg -o yaml listen audio.mp3    # YAML
dg -o table listen audio.mp3   # Formatted terminal table
dg -o csv listen audio.mp3     # CSV

-o belongs to dg itself, so it goes before the subcommand name. Without it, dg listen prints the plain-text transcript.

Shell
dg listen audio.mp3 --model nova-3    # Default model
dg listen audio.mp3 --model nova-2    # General purpose
dg listen audio.mp3 --model whisper   # Whisper model
Shell
dg listen audio.mp3 --diarize          # Speaker diarization
dg listen audio.mp3 --smart-format     # Smart formatting
dg listen audio.mp3 --summarize        # Generate summary
dg listen audio.mp3 --topics           # Topic detection
dg listen audio.mp3 --sentiment        # Sentiment analysis
Shell
dg listen audio.mp3 --webvtt           # WebVTT captions
dg listen audio.mp3 --srt              # SRT subtitles
Shell
dg listen audio.mp3 --language en-US   # English (US)
dg listen audio.mp3 --language es     # Spanish
dg listen audio.mp3 --language de     # German

Boolean options do not take a value:

Shell
dg listen audio.mp3 --punctuate
dg listen --mic --interim

Run dg listen --help for the complete set of supported CLI options. The command does not forward arbitrary API parameters.

dg transcribe is a deprecated alias for dg listen:

Shell
dg transcribe audio.mp3
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu