raconteur


Nameraconteur JSON
Version 0.5 PyPI version JSON
download
home_pagehttps://github.com/zeionara/raconteur
SummaryAn auxiliary app for simplifying speech synthesis on arbitrary texts
upload_time2023-10-26 22:55:48
maintainer
docs_urlNone
authorZeio Nara
requires_python
licenseApache 2.0
keywords speech synthesis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zeionara/raconteur",
    "name": "raconteur",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "speech,synthesis",
    "author": "Zeio Nara",
    "author_email": "zeionara@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0a/00/2721dfec371415fb51f509c9b75f6be49b2bae1466193511f28c08055fc4/raconteur-0.5.tar.gz",
    "platform": null,
    "description": "# Racounteur\n\nAn auxiliary tool for simplifying speech generation on arbitrary texts\n\n## Usage\n\n### Generate speech for any text\n\nTo generate speech for an arbitrary text, use the following command:\n\n```sh\npython -m rr say '\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440'\n```\n\nExample of command for **generating an audio book from a txt file**:\n\n```sh\npython -m rr say -e silero -a baya -grx -b 10000 -t assets/player-one.txt\n```\n\nBy default [RuTTS toolkit][1] is used, but you can specify other model using `-e` (`--engine`) cli argument:\n\n```sh\npython -m rr say '\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440' -e bark\n```\n\nCurrently the following engines are supported:\n\n1. [rutts][1] - an economical model only for russian texts;\n1. [bark][3] - multilingual model, requires a lot of gpu;\n1. [salute][4] - adapter to the cloud service from sber, requires environment variable `SALUTE_SPEECH_AUTH` to be set;\n1. [crt][5] - adapter to the cloud service from crt, requires environment variables `CRT_USERNAME`, `CRT_PASSWORD`, `CRT_DOMAIN` to be set;\n1. [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).\n1. [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.\n\nFor a full list of available cli options see [`__main__.py`][2].\n\n### Convert anecdotes to voice\n\nThe 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:\n\n```sh\npython -m rr handle-aneks -n 10\n```\n\nAlso you can use another model and specify input / output paths:\n\n```sh\npython -m rr handle-aneks -e bark -s 'assets/anecdotes.tsv' -d 'assets/anecdotes' -n 10\n```\n\nFor a full list of available cli options see [`__main__.py`][2].\n\nAlso, see the [exemplary jupyter notebook](./example.ipynb) which is regularly updated.\n\n## Installation\n\nTo create a `conda` environment with required dependencies run the following command:\n\n```sh\nconda env create -f environment.yml\n```\n\nInstall the following dependencies manually:\n\n```sh\nsudo apt-get install libportaudio2\n```\n\nAlso you need to clone [`unofficial mail ru cloud api package`][7] for being able to seamlessly upload generated files to mail ru cloud:\n\n```sh\npushd \"/home/$USER\"\ngit clone git@github.com:zeionara/carma.git\npopd\nln -s \"/home/$USER/carma/cloud_mail_api\"\n```\n\n## Testing\n\nTo run tests use the following statement:\n\n```sh\npython -m unittest discover test\n```\n\n[1]: https://github.com/Tera2Space/RUTTS\n[2]: https://github.com/zeionara/raconteur/blob/master/rr/__main__.py\n[3]: https://github.com/suno-ai/bark\n[4]: https://developers.sber.ru/portal/products/smartspeech\n[5]: https://cloud.speechpro.com/home\n[6]: https://huggingface.co/spaces/coqui/xtts\n[7]: https://github.com/zeionara/carma\n[8]: https://github.com/snakers4/silero-models\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "An auxiliary app for simplifying speech synthesis on arbitrary texts",
    "version": "0.5",
    "project_urls": {
        "Homepage": "https://github.com/zeionara/raconteur"
    },
    "split_keywords": [
        "speech",
        "synthesis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a002721dfec371415fb51f509c9b75f6be49b2bae1466193511f28c08055fc4",
                "md5": "b8beb95d87001edb2e4c740736876a6b",
                "sha256": "824686117e7c2879455d060e81c86464d5d81efbce1803c5abb8935393cecdd1"
            },
            "downloads": -1,
            "filename": "raconteur-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "b8beb95d87001edb2e4c740736876a6b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18579,
            "upload_time": "2023-10-26T22:55:48",
            "upload_time_iso_8601": "2023-10-26T22:55:48.827601Z",
            "url": "https://files.pythonhosted.org/packages/0a/00/2721dfec371415fb51f509c9b75f6be49b2bae1466193511f28c08055fc4/raconteur-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-26 22:55:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zeionara",
    "github_project": "raconteur",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "raconteur"
}
        
Elapsed time: 3.32373s