File layout
source-project/
├── index.md ← injected <audio> tag
├── pipeline/
│ └── 01-parser.md ← injected <audio> tag
├── index.mp3 ← online TTS (edge-tts)
├── pipeline/
│ └── 01-parser.mp3 ← online TTS (edge-tts)
└── voice-notes/
├── index.md ← voice-friendly rewrite
└── pipeline/
└── 01-parser.md ← voice-friendly rewrite
For local TTS (Piper), .wav files replace .mp3.
Audio embed
Each processed .md file gets an <audio> tag injected at the top:
**Audio version** — Estimated duration: 2 min 59 sec
<audio controls src="https://storage.googleapis.com/project-breakdown101.firebasestorage.app/content/md2voice/reference/output.mp3">
Your browser does not support the audio element.
</audio>
The embed skips files that already contain the **Audio version** marker. Duration is parsed via mutagen.
Voice notes
The LLM’s conversational rewrite is saved to voice-notes/ as a mirrored directory tree. These files contain:
- No markdown formatting
- No bullet points or tables
- Complete, natural sentences
- Verbal signposts (“First…”, “Let me explain…“)
Audio formats
| Backend | Format | Bitrate/Sample rate |
|---|---|---|
| edge-tts | .mp3 | Variable (Microsoft default) |
| Piper | .wav | 16-bit mono PCM (model-dependent rate) |