tts-urls

Crates.iotts-urls
lib.rstts-urls
version1.0.0
sourcesrc
created_at2020-04-28 13:04:43.82322
updated_at2021-01-30 13:40:44.696376
descriptionFormat URLs to retrieve audio from TTS (text to speech) services like Google Translate or VoiceRSS
homepage
repositoryhttps://github.com/jakobhellermann/tts-urls
max_upload_size
id234985
size15,956
Jakob Hellermann (jakobhellermann)

documentation

README

tts-urls

This crate formats URLs to retrieve audio from TTS (text to speech) services like Google Translate or VoiceRSS.

Examples

Google Translate TTS:

let url = tts_urls::google_translate::url("Hello, World!", "en");
assert_eq!(url, "https://translate.google.com/translate_tts?ie=UTF-8&q=Hello%2C%20World%21&tl=en&tk=418730.60457&client=webapp");

VoiceRSS:

use tts_urls::voicerss::VoiceRSSOptions;
let key = "key";

let url = VoiceRSSOptions::new()
    .language("de-de")
    .audio_format("32khz_16bit_stereo")
    .codec("mp3")
    .url(key, "Hallo Welt!");
assert_eq!(url, "http://api.voicerss.org/?key=key&hl=de-de&c=mp3&f=32khz_16bit_stereo&src=Hallo%20Welt%21");

Credits

This crate started out as a fork of google_translate_tts.

Commit count: 15

cargo fmt