This library is a very simple wrapper for the SVOX Pico TTS Linux package.
What is Pico TTS?
Pico is a Text-To-Speech (TTS) voice sinthesizer. It uses the TTS binary from SVOX for producing spoken text.
Supported languages: - English, US (en-US) - English, GB (en-GB) - French (fr-FR) - Italian (it-IT) - German (de-DE) - Spanish (es-ES)
Having libttspico-utils
installed on your machine
For Ubuntu:
shell
sudo apt-get install libttspico-utils
For other Linux distros (thanks to @naggety):
https://github.com/naggety/picotts
There are 2 main approaches to use this library depending on your use case, either function or struct. Both work the same.
```rust use svoxpicotts::tts::{Languages, pico2wave};
fn main() { // Function approach pico2wave("My name is john".tostring(), "testen.wav".tostring(), Languages::enUS); pico2wave("My name is william".tostring(), "testen.wav".tostring(), Languages::enGB); pico2wave("Je m'appelle Jean".tostring(), "testfr.wav".tostring(), Languages::frFR); pico2wave("Mi chiamo Giuseppe".tostring(), "testit.wav".tostring(), Languages::itIT); pico2wave("Mi nombre es alejandro".tostring(), "testes.wav".tostring(), Languages::esES); pico2wave("Ich bin Rodolf".tostring(), "testde.wav".tostring(), Languages::deDE);
// Struct approach
let mut generator = PicoTTS::new();
generator.text = "My name is john".to_string();
generator.lang = Languages::en_US;
generator.file_name = "test_en_2.wav".to_string();
let output = generator.to_wave();
// Alt struct approach
let generator = PicoTTS {
text: "My name is john".to_string(),
lang: Languages::en_US,
file_name: "test_en_3.wav".to_string()
};
let output = generator.to_wave();
} ```