Crates.io | tts-urls |
lib.rs | tts-urls |
version | 1.0.0 |
source | src |
created_at | 2020-04-28 13:04:43.82322 |
updated_at | 2021-01-30 13:40:44.696376 |
description | Format URLs to retrieve audio from TTS (text to speech) services like Google Translate or VoiceRSS |
homepage | |
repository | https://github.com/jakobhellermann/tts-urls |
max_upload_size | |
id | 234985 |
size | 15,956 |
This crate formats URLs to retrieve audio from TTS (text to speech) services like Google Translate or VoiceRSS.
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");
This crate started out as a fork of google_translate_tts.