A library for Yandex speech kit
Project description
Generation of speech using Yandex SpeechKit.
- Import module
from yandex_speech import tts
- Call a function
tts.generate_voice("Привет", "mp3", "jane", "60589d42-0e42-b742-8942-thekeyisalie")
Required parameters:
text - Text to speech: “Р·+амок” (before the stressed vowel can be put “+”; the restriction on line length: 2000 bytes);
extension - Audio file format: “mp3”, “wav”, “opus”;
- speaker - Speaker
female: “jane”, “oksana”, “alyss”, “omazh”;
male: “zahar”, “ermil”;
key - API‑key.
Optional parameters:
lang - Language: “ru‑RU”, “en-US”, “tr-TR”, “uk-UK”;
path - A path to save file: “test”, “dirname/test”, “test.mp3”, “dirname/test.mp3”;
emotion - The color of the voice: “neutral” (by default), “evil”, “good”;
speed - Speech tempo: a value between 0.1 (slowest) to 3.0 (fastest).
Returns the path.
References
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.