yakyak


Nameyakyak JSON
Version 0.5.4 PyPI version JSON
download
home_pagehttps://github.com/b202i/yakyak
SummaryUtility for generating synthetic voice with Wyoming-Piper.
upload_time2024-03-10 12:32:16
maintainer
docs_urlNone
authorMakerMattDesign
requires_python>=3.7
licenseMIT
keywords utility synthetic-voice wyoming-piper tts
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # YakYak
YakYak is a utility for the generation of synthetic voice through use of Wyoming-Piper.
It can be used from the command line or called from python. It opens a TCP socket to
Wyoming-Piper running in Docker anywhere on your local area network. It scales to run 
efficiently on large multi-core computers or small single board computers.

## Install YakYak, Docker Compose & FFMPEG
To install YakYak, python virtual environment is recommended.

Step 1, create a python virtual environment and activate it
> cd some_directory  
> python3 -m venv .venv  
> source .venv/bin/activate

Step 2, install the yakyak package
> pip install yakyak
 
### Setup wyoming-piper in docker, on your local area network.   
The default docker_compose.yml is distributed in github.  
> docker compose up -d
 
### Install ffmpeg for mac  
> brew install ffmpeg
 
### Install ffmpeg for Ubuntu  
> sudo apt install ffmpeg
 
## Test YakYak, Wyoming-Piper and FFMPEG installation
It will take a little longer the first time running YakYak, 
the Wyoming-Piper app needs time to download voice files.
> piper -h localhost -t mp3
 
Observe successful test results  

```text
INFO:root:Server localhost:10200 is online
INFO:root:Success, test: mp3
```

## How to use YakYak from the command line
As with many Linux applications, YakYak supports standard in, and standard out. It also supports file input with the -i command and -o for file output. For a complete set of commands type yakyak --help.
> yakyak --help

Create an mp3 file with "Hello world"  
> echo Hello world | yakyak -f mp3 -o hello_world.mp3

If you are on Linux and have aplay installed, you can do this:  
> echo Hello world | yakyak | aplay
This assumes that Docker is running on the same machine.

If Docker is running on a different machine on your network, you can do this:  
> echo Hello world | yakyak --host a_different_machine.local | aplay

## How to use YakYak from Python
Create the file `test_yakyak.py` with the following content:  
```python
from yakyak import is_server_online, piper_tts_server

print(f"{is_server_online(
        'localhost', 
        10200, 
        )=}")

print(f"{piper_tts_server(
        'localhost', 
        10200, 
        'Hello World',
        'hello_world.mp3',
        'mp3',
        'en_US-amy-medium'
        )=}")
```
> python3 test_yakyak.py  
Observe that the server is online and a file hello_world.mp3 is created. Play the mp3 and you will hear "Hello world".

## Python run.py Test

From the command line type `python3 run.py` will produce the following when successful:
> python3 run.py
```text
run.py 
check_ffmpeg_version()='ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers'
is_server_online(
        'localhost', 
        10200, 
        )=True
INFO:root:Server localhost:10200 is online
run_test(
        'localhost', 
        10200, 
        'mp3',
        )=(True, 'Success, test: mp3')
INFO:root:Success, test: mp3
await piper_tts_server(
            'localhost', 
            10200, 
            'Hello World',
            'run_test.mp3',
            'mp3',
            'en_US-amy-medium'
            )=None

Process finished with exit code 0
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/b202i/yakyak",
    "name": "yakyak",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "utility synthetic-voice wyoming-piper tts",
    "author": "MakerMattDesign",
    "author_email": "matt@makermattdesign.com",
    "download_url": "https://files.pythonhosted.org/packages/95/42/c4b17a6aa8e49f2520b4d27d3497ecf3c29de75861ddaaa014e65457382a/yakyak-0.5.4.tar.gz",
    "platform": null,
    "description": "# YakYak\nYakYak is a utility for the generation of synthetic voice through use of Wyoming-Piper.\nIt can be used from the command line or called from python. It opens a TCP socket to\nWyoming-Piper running in Docker anywhere on your local area network. It scales to run \nefficiently on large multi-core computers or small single board computers.\n\n## Install YakYak, Docker Compose & FFMPEG\nTo install YakYak, python virtual environment is recommended.\n\nStep 1, create a python virtual environment and activate it\n> cd some_directory  \n> python3 -m venv .venv  \n> source .venv/bin/activate\n\nStep 2, install the yakyak package\n> pip install yakyak\n \n### Setup wyoming-piper in docker, on your local area network.   \nThe default docker_compose.yml is distributed in github.  \n> docker compose up -d\n \n### Install ffmpeg for mac  \n> brew install ffmpeg\n \n### Install ffmpeg for Ubuntu  \n> sudo apt install ffmpeg\n \n## Test YakYak, Wyoming-Piper and FFMPEG installation\nIt will take a little longer the first time running YakYak, \nthe Wyoming-Piper app needs time to download voice files.\n> piper -h localhost -t mp3\n \nObserve successful test results  \n\n```text\nINFO:root:Server localhost:10200 is online\nINFO:root:Success, test: mp3\n```\n\n## How to use YakYak from the command line\nAs with many Linux applications, YakYak supports standard in, and standard out. It also supports file input with the -i command and -o for file output. For a complete set of commands type yakyak --help.\n> yakyak --help\n\nCreate an mp3 file with \"Hello world\"  \n> echo Hello world | yakyak -f mp3 -o hello_world.mp3\n\nIf you are on Linux and have aplay installed, you can do this:  \n> echo Hello world | yakyak | aplay\nThis assumes that Docker is running on the same machine.\n\nIf Docker is running on a different machine on your network, you can do this:  \n> echo Hello world | yakyak --host a_different_machine.local | aplay\n\n## How to use YakYak from Python\nCreate the file `test_yakyak.py` with the following content:  \n```python\nfrom yakyak import is_server_online, piper_tts_server\n\nprint(f\"{is_server_online(\n        'localhost', \n        10200, \n        )=}\")\n\nprint(f\"{piper_tts_server(\n        'localhost', \n        10200, \n        'Hello World',\n        'hello_world.mp3',\n        'mp3',\n        'en_US-amy-medium'\n        )=}\")\n```\n> python3 test_yakyak.py  \nObserve that the server is online and a file hello_world.mp3 is created. Play the mp3 and you will hear \"Hello world\".\n\n## Python run.py Test\n\nFrom the command line type `python3 run.py` will produce the following when successful:\n> python3 run.py\n```text\nrun.py \ncheck_ffmpeg_version()='ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers'\nis_server_online(\n        'localhost', \n        10200, \n        )=True\nINFO:root:Server localhost:10200 is online\nrun_test(\n        'localhost', \n        10200, \n        'mp3',\n        )=(True, 'Success, test: mp3')\nINFO:root:Success, test: mp3\nawait piper_tts_server(\n            'localhost', \n            10200, \n            'Hello World',\n            'run_test.mp3',\n            'mp3',\n            'en_US-amy-medium'\n            )=None\n\nProcess finished with exit code 0\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Utility for generating synthetic voice with Wyoming-Piper.",
    "version": "0.5.4",
    "project_urls": {
        "Homepage": "https://github.com/b202i/yakyak"
    },
    "split_keywords": [
        "utility",
        "synthetic-voice",
        "wyoming-piper",
        "tts"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d78c86720c254dca084c4b0e81d5e314f1c59cb0d52726c04698e82c1e656dca",
                "md5": "aa53cb8862563dae18a1dfde3bd88a8c",
                "sha256": "c98aaf3685cb5d01f1a4bbc1c8ce981760877eb298e5300078c8c66eb18611ed"
            },
            "downloads": -1,
            "filename": "yakyak-0.5.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa53cb8862563dae18a1dfde3bd88a8c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7083,
            "upload_time": "2024-03-10T12:32:14",
            "upload_time_iso_8601": "2024-03-10T12:32:14.901375Z",
            "url": "https://files.pythonhosted.org/packages/d7/8c/86720c254dca084c4b0e81d5e314f1c59cb0d52726c04698e82c1e656dca/yakyak-0.5.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9542c4b17a6aa8e49f2520b4d27d3497ecf3c29de75861ddaaa014e65457382a",
                "md5": "d00c0a3381e00301d4f20c66868d0906",
                "sha256": "6a13219e0a233beef3d423e6863bc0c58ce1060b4f634ea2306fe4dcb208d5ee"
            },
            "downloads": -1,
            "filename": "yakyak-0.5.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d00c0a3381e00301d4f20c66868d0906",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6659,
            "upload_time": "2024-03-10T12:32:16",
            "upload_time_iso_8601": "2024-03-10T12:32:16.762991Z",
            "url": "https://files.pythonhosted.org/packages/95/42/c4b17a6aa8e49f2520b4d27d3497ecf3c29de75861ddaaa014e65457382a/yakyak-0.5.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-10 12:32:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "b202i",
    "github_project": "yakyak",
    "github_not_found": true,
    "lcname": "yakyak"
}
        
Elapsed time: 0.20221s