Skip to main content
You will build: a script that reads a file of messages and saves each one as a small Opus file, skipping any message already spoken. Run it again after editing the list: only new or changed messages cost anything. You will need: Python 3.9+, pip install namu-ai (Python library), and NAMU_API_KEY set.
1

Write the messages

One message per line, in messages.txt:
messages.txt
2

Speak each message once

The file name is a fingerprint of the voice and the text, so the same message is never generated twice:
speak_all.py
3

Run it

Each file is a few dozen kilobytes: light enough to send over WhatsApp or play on 2G.

Make it yours

  • Zarma: set VOICE = "mouhamad"; he speaks Zarma unless told otherwise.
  • MP3 for old phones: format="mp3" and .mp3 names.
  • Serve the files from your own storage or a CDN; never call the API once per listener.

Next

Voice reminders for a health centre

Personal messages from templates

Text to speech

Every option