An http api client which allows to automatically convert russian short texts into speech using vk cloud
Project description
Marude
Marusia demo interface - an http api client which allows to automatically convert russian short texts into speech using vk cloud.
Installation
To create a conda environment and install dependencies use the following command:
conda create -f environment.yml
Then activate created environment:
conda activate marude
Usage
After the environment is set up, the app can be used from the command line:
python -m marude tts 'Привет, мир' -m pavel -p message.mp3
The provided text (which must be 1024 characters long or shorter) will be converted into speech and saved as an audiofile message.mp3
. By default the file is saved at assets/message.mp3
.
The module can be used programmatically as well. First, install the module through pip
:
pip install marude
Then run your script, which may look like this (see example):
from tasty import pipe
from marude import CloudVoiceClient, Voice
if __name__ == '__main__':
client = CloudVoiceClient(Voice.MARIA)
with open('message-1.mp3', 'wb') as file:
_ = 'Съешь еще этих мягких французских булок' | pipe | client.tts | pipe | file.write
with open('message-2.mp3', 'wb') as file:
_ = 'да выпей чаю' | pipe | client.tts | pipe | file.write
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.