This folder contains:
generate_audio.py— reads a 2-column CSV and generates MP3 files using ElevenLabs.index.html— local interactive practice page.sample_words.csv— example CSV input.
python3 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip python -m pip install requests export ELEVENLABS_API_KEY="" python generate_audio.py sample_words.csv --voice-id BHf91PCMVcVwq6r1ku7L --output-dir ./audio
pip install requestsexport ELEVENLABS_API_KEY="YOUR_API_KEY"$env:ELEVENLABS_API_KEY="YOUR_API_KEY"Use a voice ID from your ElevenLabs account. BHf91PCMVcVwq6r1ku7L
python generate_audio.py sample_words.csv --voice-id YOUR_VOICE_ID --output-dir ./audioThat command also generates audio/manifest.json.
By default, generate_audio.py now sends these ElevenLabs settings:
model_id:eleven_multilingual_v2language_code:enoutput_format:mp3_44100_128speed:0.85stability:0.80similarity_boost:1.00style:0.00use_speaker_boost:false
You can override any of them with CLI flags such as --speed, --stability, --similarity-boost, --style, --speaker-boost, or --no-speaker-boost.
Double-click index.html.
The CSV uses only these two columns:
filenametext
No other columns are needed.
Recommended filename pattern:
Word_<word>Definition_<word>Sentence_<word>
Examples:
Word_abacusDefinition_abacusSentence_abacus
Browsers do not safely enumerate arbitrary local folders from a plain HTML file. Because of that, the page reads audio/manifest.json, which is generated by generate_audio.py.
python generate_audio.py ignored.csv --voice-id ANYTHING --output-dir ./audio --manifest-onlyThe csv_path argument is ignored when --manifest-only is used.
Run:
python generate_audio.py dummy.csv --voice-id ignored --output-dir ./audio --manifest-onlyThe CSV and voice are ignored in --manifest-only mode. This only scans the audio folder and rebuilds:
audio/manifest.jsonaudio/manifest.js
Then double-click index.html.
Word_abacus.mp3Definition_abacus.mp3Sentence_abacus.mp3
The shared suffix (abacus) is what groups the three files into one card.