Skip to main content
MarkItDown can extract metadata from audio files and transcribe speech content using Google’s speech recognition service.

Supported Formats

  • WAV: .wav (uncompressed audio)
  • MP3: .mp3 (MPEG audio)
  • M4A: .m4a (AAC audio)
  • MP4: .mp4 (video files with audio tracks)

Dependencies

Metadata Extraction (Optional)

Speech Transcription

Or install with audio extras:
Audio Format Support: The pydub library requires ffmpeg or libav for MP3/M4A/MP4 formats:
  • macOS: brew install ffmpeg
  • Ubuntu/Debian: sudo apt-get install ffmpeg
  • Windows: Download from ffmpeg.org

Features

EXIF Metadata

Extract artist, album, genre, and technical details

Speech Transcription

Convert speech to text using Google Speech Recognition

Audio Properties

Sample rate, bit depth, channels, duration

Multiple Formats

Support for WAV, MP3, M4A, and MP4

Basic Usage

Output Examples

With Metadata and Transcription

Transcription Only

No Speech Detected

Metadata Fields

The converter extracts the following metadata fields (when available via ExifTool):
Note: Duration is not extracted when reading from memory streams due to potential inaccuracies.

Speech Transcription

How It Works

  1. Format Detection: Automatically detects audio format from extension/MIME type
  2. Format Conversion: Non-WAV formats (MP3, M4A, MP4) are converted to WAV using pydub
  3. Speech Recognition: Google Speech Recognition API transcribes the audio
  4. Output: Transcript added under ### Audio Transcript: heading

Supported Audio Formats

WAV files are processed directly without conversion:
Formats: AIFF and FLAC are also processed directly.
MP3 files are converted to WAV before transcription:
Requires: ffmpeg or libav installed.
M4A and MP4 files extract audio track and convert to WAV:
Requires: ffmpeg or libav installed.

Transcription Limitations

  • Internet Required: Google Speech Recognition requires an internet connection
  • Language: Currently only supports English by default
  • Length: Very long audio files may fail or take considerable time
  • Quality: Transcription accuracy depends on audio quality, accent, background noise
  • API Limits: Google’s free tier has usage limits

Implementation Details

Source Location

Converter Class

  • Class Name: AudioConverter
  • Accepted Extensions: .wav, .mp3, .m4a, .mp4
  • MIME Types: audio/x-wav, audio/mpeg, video/mp4

Transcription Function

Advanced Examples

Batch Transcription

Extract Only Metadata

Podcast Episode Processing

Convert Video to Transcript

Error Handling

Use Cases

Record meetings and automatically generate searchable transcripts with speaker metadata.
Extract episode metadata and transcripts for podcast archives and show notes.
Convert audio interviews to text for analysis and quotation.
Transcribe voice memos and extract creation dates for organization.
Extract spoken content from video files for searchability.
Extract and catalog metadata from audio file collections.

Next Steps

Image Formats

Learn about image conversion with metadata extraction

Video Processing

Extract transcripts from YouTube videos