You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3.0 KiB
3.0 KiB
TTS (Text-to-Speech) Setup
TTS announcements convert text files to AMBE and play them on a talkgroup at intervals or hourly.
Pipeline
.txt → gTTS → .mp3 → ffmpeg → .wav (8kHz mono) → vocoder/AMBEServer → .ambe → broadcast
First-time setup
-
Create the text file in
Audio/<LANGUAGE>/ondemand/<FILE>.txtExample for
FILE: texto1andLANGUAGE: es_ES:Audio/es_ES/ondemand/texto1.txtPut the text you want spoken in that file (UTF-8).
-
Configure encoding — choose one:
- Physical AMBE (DV3000): set
TTS_AMBESERVER_HOSTto the host where AMBEServer runs (connected to the DV3000). - Software vocoder: set
TTS_VOCODER_CMDwith a command like/usr/local/bin/md380-vocoder -e {wav} {ambe}.
- Physical AMBE (DV3000): set
-
Enable the TTS item in
TTS_ANNOUNCEMENTS:TTS_ANNOUNCEMENTS: - ENABLED: true FILE: texto1 TG: 2 MODE: interval INTERVAL: 60 LANGUAGE: es_ES
How it works
- First run: The system reads
texto1.txt, generates speech (gTTS), converts to WAV, encodes to AMBE via the configured vocoder/AMBEServer, savestexto1.ambe, and broadcasts it. - Later runs: If
texto1.ambeexists and is newer thantexto1.txt, it uses the cached AMBE file directly (no conversion). - Update text: Edit
texto1.txtand save. On the next interval, the system will regeneratetexto1.ambebecause the .txt is newer.
Physical AMBE (AMBEServer)
When using a DV3000 or similar hardware via AMBEServer:
- Run AMBEServer on a host with the DV3000 connected (USB/serial).
- In
adn-voice.yaml:TTS_AMBESERVER_HOST: "192.168.1.10" # host where AMBEServer runs TTS_AMBESERVER_PORT: 2460 # default - Ensure the ADN server can reach that host:port (UDP).
Troubleshooting physical AMBE
| Symptom | Check |
|---|---|
| "Text file not found" | Create Audio/<LANG>/ondemand/<FILE>.txt (e.g. Audio/es_ES/ondemand/texto1.txt) |
| "AMBEServer failed, trying external vocoder..." | AMBEServer unreachable or timeout. Verify host/port, firewall, AMBEServer running. |
| "Could not encode to AMBE" | Neither AMBEServer nor TTS_VOCODER_CMD worked. Set one of them. |
| "Timeout connecting to AMBEServer" | Network/firewall; AMBEServer not listening; DV3000 not connected. |
| No audio plays | Check logs for "(TTS) Playing TTS file" — if present, broadcast succeeded; check TG and bridge targets. |
Log messages
(TTS) Converting text to AMBE: ...— first-time conversion in progress(TTS) Using AMBEServer host:port— using physical AMBE(TTS) Using cached AMBE— .ambe exists and is newer than .txt(TTS) AMBEServer failed, trying external vocoder...— AMBEServer failed; fallback to TTS_VOCODER_CMD if set
Dependencies
- gTTS:
pip install gTTS - ffmpeg: system package (
apt install ffmpegetc.) - AMBEServer (physical AMBE): marrold/AMBEServer on a host with DV3000