| Name | Source | Component |
|---|---|---|
| espeak-ng | host | core |
| onnx-runtime | host | core |
| fmt | vcpkg | core |
| spdlog | vcpkg | core |
| nlohmann-json | vcpkg | core |
| utfcpp | vcpkg | core |
| uni-algo | vcpkg | core |
| libsndfile | vcpkg | audio |
| cxxopts | vcpkg | CLI |
Install espeak-ng:
$ sudo apt install libespeak-ng-dev espeak-ng-data Install ONNX (GPU):
$ export DEST_DIR=$HOME/.local
$ wget https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-gpu-1.21.0.tgz
$ tar xf onnxruntime-linux-x64-gpu-1.21.0.tgz -C /tmp
$ pushd /tmp/onnxruntime-linux-x64-gpu-1.21.0
$ mkdir -p $DEST_DIR/{include/onnxruntime,lib}
$ cp -r include/* $DEST_DIR/include/onnxruntime
$ cp -r lib/* $DEST_DIR/lib
$ popd
$ rm -f onnxruntime-linux-x64-gpu-1.21.0.tgzInstall ONNX (CPU, mutually exclusive with GPU variant, see above):
$ export DEST_DIR=$HOME/.local
$ wget https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-1.21.0.tgz
$ tar xf onnxruntime-linux-x64-1.21.0.tgz -C /tmp
$ pushd /tmp/onnxruntime-linux-x64-1.21.0
$ mkdir -p $DEST_DIR/{include/onnxruntime,lib}
$ cp -r include/* $DEST_DIR/include/onnxruntime
$ cp -r lib/* $DEST_DIR/lib
$ popd
$ rm -f onnxruntime-linux-x64-1.21.0.tgzVoxer is a tiny text to speech C++ library.
| Type | Name | Stage | Default | Type | Example | Description |
|---|---|---|---|---|---|---|
| cmake | VOXER_ENABLE_TESTS |
Build | OFF | Boolean | Enable unit tests | |
| cmake | VOXER_ENABLE_FORMATTED |
Build | ON | Boolean | Enable formatted audio data support | |
| env | VOXER_VOICES_DOWNLOAD |
Build | OFF | Boolean | Enable voices downloading while building | |
| env | VOXER_VOICES_LIST |
Build | - | List | "en_US+amy+medium;uk_UA+lada+x_low" | Set the list of voices to download |
| env | VOXER_MODEL_FILE |
Runtime | - | String | "/usr/share/voxer/voices/en_US-amy-medium.onnx" | Set the path to voice model file (*.onnx) |
| env | VOXER_ESPEAK_DIR |
Runtime | - | String | "/usr/lib/espeak-ng-data" | Set The path to eSpeak-Ng files |
See the list of available voices to download at config/voices/voices.csv file.
Output artifacts default location is <build-dir>/stage.
Packing artifacts includes the following files:
libvoxer_<version>_.deblibvoxer-dev_<version>_.deb- (optional)
libvoxer-data_<version>_.deb
Run docker container:
$ bash scripts/run-build-env.sh -mDefine variable whether to download voice models:
# Run to enable voice models downloading
export VOXER_VOICES_DOWNLOAD=1
export VOXER_VOICES_LIST="en_US+amy+medium;uk_UA+lada+x_low"
# Run to disable voice models downloading
unset VOXER_VOICES_DOWNLOAD
unset VOXER_VOICES_LISTBuild and create packages:
# Debug
$ cmake --workflow --fresh --preset debug-docker
# Release
$ cmake --workflow --fresh --preset release-dockerDefine variable whether to download voice models:
# Run to enable voice models downloading
export VOXER_VOICES_DOWNLOAD=1
export VOXER_VOICES_LIST="en_US+amy+medium;uk_UA+lada+x_low"
# Run to disable voice models downloading
unset VOXER_VOICES_DOWNLOAD
unset VOXER_VOICES_LISTBuild and create packages:
# Debug
$ cmake --workflow --fresh --preset debug
# Release
$ cmake --workflow --fresh --preset releaseInstall artifacts to specific location:
$ cmake --install <build-dir> --prefix <destination-path>/voxer- Add
voxerdependency into projectvcpkg.jsonfile - Download
*.onnxand*.onnx.jsonmodel files (see VOICES.md file)
Define input parameters:
export MODEL="<model>.onnx"
export FILES="/usr/share/espeak-ng-data"
export INPUT="Hello World"Display version:
$ voxer-cli -v
Voxer 0.2.2 (447a7fb9)Display information:
$ voxer-cli --model $MODEL --files $FILES --infoSave into WAV file:
$ echo $INPUT | voxer-cli --model $MODEL --files $FILES --output-file welcome.wav --wavSave into RAW file:
$ echo $INPUT | voxer-cli --model $MODEL --files $FILES --output-file welcome.raw --rawPlay using gstreamer (WAV format):
$ echo $INPUT \
| voxer-cli --model $MODEL --files $FILES --wav --output-file - \
| gst-launch-1.0 -e fdsrc fd=0 ! wavparse ! audioconvert ! audioresample ! autoaudiosink sync=falsePlay using gstreamer (RAW format):
$ echo $INPUT \
| voxer-cli --model $MODEL --files $FILES --raw --output-file - \
| gst-launch-1.0 -e fdsrc fd=0 ! rawaudioparse num-channels=1 sample-rate=22050 ! audioconvert ! audioresample ! autoaudiosink sync=false