# Racounteur
An auxiliary tool for simplifying speech generation on arbitrary texts
## Usage
### Generate speech for any text
To generate speech for an arbitrary text, use the following command:
`sh python -m rr say 'Привет, мир' `
Example of command for generating an audio book from a txt file:
`sh python -m rr say -e silero -a baya -grx -b 10000 -t assets/player-one.txt `
By default [RuTTS toolkit][1] is used, but you can specify other model using -e (–engine) cli argument:
`sh python -m rr say 'Привет, мир' -e bark `
Currently the following engines are supported:
1. [rutts][1] - an economical model only for russian texts; 1. [bark][3] - multilingual model, requires a lot of gpu; 1. [salute][4] - adapter to the cloud service from sber, requires environment variable SALUTE_SPEECH_AUTH to be set; 1. [crt][5] - adapter to the cloud service from crt, requires environment variables CRT_USERNAME, CRT_PASSWORD, CRT_DOMAIN to be set; 1. [coqui][6] - multilingual xtts model, utilizes a moderate amount of gpu (much less than [bark][3], but works better), works very slowly (270.43189 seconds per anek in average on gtx 1650 vs 3-5 seconds for rutts), requires file `assets/female.wav` which can be downloaded from [here][6] and replaced with desired speaker’s voice recording). 1. [silero][8] - amazing models for speech generation, which produce audio with good quality in a reasonable amount of time without requiring a lot of resources.
For a full list of available cli options see [__main__.py][2].
### Convert anecdotes to voice
The app natively supports one specific use-case: it allows to synthesize speech for anecdotes from [this kaggle dataset](https://www.kaggle.com/datasets/zeionara/anecdotes?select=anecdotes.tsv). The command is similar to the examples listed above, to use rutts model for reading aloud the first 10 anecdotes you can just type:
`sh python -m rr handle-aneks -n 10 `
Also you can use another model and specify input / output paths:
`sh python -m rr handle-aneks -e bark -s 'assets/anecdotes.tsv' -d 'assets/anecdotes' -n 10 `
For a full list of available cli options see [__main__.py][2].
Also, see the [exemplary jupyter notebook](./example.ipynb) which is regularly updated.
## Installation
To create a conda environment with required dependencies run the following command:
`sh conda env create -f environment.yml `
Install the following dependencies manually:
`sh sudo apt-get install libportaudio2 `
Also you need to clone [unofficial mail ru cloud api package][7] for being able to seamlessly upload generated files to mail ru cloud:
`sh pushd "/home/$USER" git clone git@github.com:zeionara/carma.git popd ln -s "/home/$USER/carma/cloud_mail_api" `
## Testing
To run tests use the following statement:
`sh python -m unittest discover test `
[1]: https://github.com/Tera2Space/RUTTS [2]: https://github.com/zeionara/raconteur/blob/master/rr/__main__.py [3]: https://github.com/suno-ai/bark [4]: https://developers.sber.ru/portal/products/smartspeech [5]: https://cloud.speechpro.com/home [6]: https://huggingface.co/spaces/coqui/xtts [7]: https://github.com/zeionara/carma [8]: https://github.com/snakers4/silero-models
Metadata
Release files for raconteur 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| raconteur-0.5.tar.gz | 18.6 kB | Without provenance | Details for raconteur-0.5.tar.gz |
Release files / raconteur-0.5.tar.gz
| Download URL | raconteur-0.5.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
824686117e7c2879455d060e81c86464d5d81efbce1803c5abb8935393cecdd1
|
|
BLAKE2b-256 checksum How to use checksums |
0a002721dfec371415fb51f509c9b75f6be49b2bae1466193511f28c08055fc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.7
|
Security for raconteur 0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.