Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marude-0.3.0.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

marude-0.3.0-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page