Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julien-cpsn/rust-svox-pico-tts
Very simple wrapper for the SVOX Pico TTS Linux package
https://github.com/julien-cpsn/rust-svox-pico-tts
pico rust svox tts wrapper
Last synced: about 1 month ago
JSON representation
Very simple wrapper for the SVOX Pico TTS Linux package
- Host: GitHub
- URL: https://github.com/julien-cpsn/rust-svox-pico-tts
- Owner: Julien-cpsn
- License: mit
- Created: 2023-07-12T23:30:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-28T01:20:39.000Z (over 1 year ago)
- Last Synced: 2023-08-28T03:12:08.043Z (over 1 year ago)
- Topics: pico, rust, svox, tts, wrapper
- Language: Rust
- Homepage: https://crates.io/crates/svox_pico_tts
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Rust Wrapper for SVOX Pico TTS
===[![Rust](https://github.com/Julien-cpsn/Rust-SVOX-Pico-TTS/actions/workflows/rust.yml/badge.svg)](https://github.com/Julien-cpsn/Rust-SVOX-Pico-TTS/actions/workflows/rust.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)## Introduction
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)## Prerequisites
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/nagget)):
https://github.com/naggety/picotts
## Usage example
There are 2 main approaches to use this library depending on your use case, either function or struct.
Both work the same.```rust
use svox_pico_tts::tts::{Languages, pico2wave};fn main() {
// Function approach
pico2wave("My name is john".to_string(), "test_en.wav".to_string(), Languages::en_US);
pico2wave("My name is william".to_string(), "test_en.wav".to_string(), Languages::en_GB);
pico2wave("Je m'appelle Jean".to_string(), "test_fr.wav".to_string(), Languages::fr_FR);
pico2wave("Mi chiamo Giuseppe".to_string(), "test_it.wav".to_string(), Languages::it_IT);
pico2wave("Mi nombre es alejandro".to_string(), "test_es.wav".to_string(), Languages::es_ES);
pico2wave("Ich bin Rodolf".to_string(), "test_de.wav".to_string(), Languages::de_DE);
// 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();
}
```