Aulafy
Courses/Generative AI: image, voice and video/Local voice: Whisper and Piper

Local voice: Whisper and Piper

Voice is one of the most useful forms of generative AI for education: transcribing lectures, creating subtitles, narrating short lessons, and making materials accessible without always relying on the cloud.

  • Transcribe audio to text and subtitles with Whisper.
  • Generate local narration with Piper.
  • Prepare clean files for video, web, or podcast.

Transcribe with Whisper

TerminalCode
python -m venv .venv
source .venv/bin/activate
pip install -U openai-whisper

whisper clase.mp3 \
  --model medium \
  --language Spanish \
  --output_format srt \
  --output_dir subtitulos/

Narrate with Piper

TerminalCode
pip install -U piper-tts

cat guion.txt | piper \
  --model voces/es_ES-modelo.onnx \
  --output_file narracion.wav

Script prepared for TTS

TerminalCode
Título: Qué es RAG
Duración objetivo: 90 segundos
Tono: claro, docente, sin bromas internas

Texto:
RAG significa generación aumentada por recuperación.
En lugar de pedir al modelo que recuerde, primero buscamos documentos relevantes.
Después el modelo responde usando solo esas fuentes.