pdf-icon

Product Guide

Offline Voice Recognition

Industrial Control

IoT Measuring Instruments

Air Quality

Module13.2 PPS

Ethernet Camera

DIP Switch Usage Guide

Module GPS v2.0

Module GNSS

Module ExtPort For Core2

Module LoRa868 V1.2

MeloTTS

  • This section only explains how to run the precompiled MeloTTS text-to-speech demo on Raspberry Pi 5;
  • For model conversion and example source code compilation, please refer to melotts.axcl.
  1. Download
git clone https://github.com/ml-inory/melotts.axcl.git
chmod +x build_aarch64.sh
./build_aarch64.sh
  1. Precompiled Models
cd melotts.axcl
./download_models.sh

Precompiled model download links:

  1. Compile

For aarch64 platform:

./build_aarch64.sh
  1. Run MeloTTS

In the melotts.axcl project root directory, run:

./install/melotts -s sentence

Example for running with English model:

./install/melotts -e ../MeloTTS-English-ax650/encoder-en.onnx -d ../MeloTTS-English-ax650/decoder-en-au.axmodel -l ../MeloTTS-English-ax650/lexicon-en.txt -t ../MeloTTS-English-ax650/tokens-en.txt --g ../MeloTTS-English-ax650/g-en-au.bin -s "M5Stack is a leading provider of IoT solutions, committed to providing developers worldwide with convenient and flexible development components and tools."

Example Output:

m5stack@raspberrypi5:~/melotts.axcl $ ./install/melotts -e ../MeloTTS-English-ax650/encoder-en.onnx -d ../MeloTTS-English-ax650/decoder-en-au.axmodel -l ../MeloTTS-English-ax650/lexicon-en.txt -t ../MeloTTS-English-ax650/tokens-en.txt --g ../MeloTTS-English-ax650/g-en-au.bin -s "M5Stack is a leading provider of IoT solutions, committed to providing developers worldwide with convenient and flexible development components and tools."
encoder: ../MeloTTS-English-ax650/encoder-en.onnx
decoder: ../MeloTTS-English-ax650/decoder-en-au.axmodel
lexicon: ../MeloTTS-English-ax650/lexicon-en.txt
token: ../MeloTTS-English-ax650/tokens-en.txt
sentence: M5Stack is a leading provider of IoT solutions, committed to providing developers worldwide with convenient and flexible development components and tools.
wav: output.wav
speed: 0.800000
sample_rate: 44100
Load encoder
Load decoder model
Encoder run take 535.47ms
decoder slice num: 9
Decode slice(1/9) take 40.15ms
Decode slice(2/9) take 39.87ms
Decode slice(3/9) take 39.86ms
Decode slice(4/9) take 39.75ms
Decode slice(5/9) take 40.19ms
Decode slice(6/9) take 39.79ms
Decode slice(7/9) take 39.77ms
Decode slice(8/9) take 39.82ms
Decode slice(9/9) take 40.34ms
Saved audio to output.wav
On This Page