ovos-audio


Nameovos-audio JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/OpenVoiceOS/ovos-audio
Summaryovos-core audio daemon client
upload_time2024-11-05 03:49:09
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ovos-audio

The "mouth" of the OVOS assistant!

Handles TTS generation and sounds playback

## Install

`pip install ovos-audio[extras]` to install this package and the default plugins.

Without `extras`, you will also need to manually install, and possibly configure TTS modules as described below.

# Configuration

under mycroft.conf

```javascript
{

  // Text to Speech parameters
  "tts": {
    "module": "ovos-tts-plugin-server",
    "fallback_module": "ovos-tts-plugin-mimic",
    "ovos-tts-plugin-mimic": {
        "voice": "ap"
    }
  },

  // File locations of sounds to play for system events
  "sounds": {
    "start_listening": "snd/start_listening.wav",
    "end_listening": "snd/end_listening.wav",
    "acknowledge": "snd/acknowledge.mp3",
    "error": "snd/error.mp3"
  },

  // Mechanism used to play WAV audio files
  "play_wav_cmdline": "paplay %1 --stream-name=mycroft-voice",

  // Mechanism used to play MP3 audio files
  "play_mp3_cmdline": "mpg123 %1",

  // Mechanism used to play OGG audio files
  "play_ogg_cmdline": "ogg123 -q %1"
}
```

## Using Legacy AudioService

The legacy audio service supports audio playback via the old mycroft api ([@mycroft](https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/skills/audioservice.py#L43) [@ovos](https://github.com/OpenVoiceOS/ovos-bus-client/blob/dev/ovos_bus_client/apis/ocp.py#L51))

by default OCP delegates to the legacy audio service when necessary and no action is needed, but if you want to disable ocp this api can be used as the sole media playback provider

> **NOTE:** once ovos-media is released OCP and this api will be disabled by default and deprecated!

```javascript
{
    "enable_old_audioservice": true,
    "disable_ocp": true,
    "Audio": {
        "default-backend": "vlc",
        "backends": {
          "simple": {
            "type": "ovos_audio_simple",
            "active": true
          },
          "vlc": {
            "type": "ovos_vlc",
            "active": true
          }
        }
    }
  },
}
```

legacy plugins:
- [vlc](https://github.com/OpenVoiceOS/ovos-vlc-plugin)
- [simple](https://github.com/OpenVoiceOS/ovos-audio-plugin-simple) (no https support)
- [mpv](https://github.com/OpenVoiceOS/ovos-audio-plugin-mpv) <- recommended default
- [chromecast](https://github.com/OpenVoiceOS/ovos-media-plugin-chromecast)
- [spotify](https://github.com/OpenVoiceOS/ovos-media-plugin-spotify)

**OCP technical details:**

- OCP was developed for mycroft-core under the legacy audio service system
- OCP is **always** the default audio plugin, unless you set `"disable_ocp": true` in config
- OCP uses the legacy api internally, to delegate playback when GUI is not available (or when configured to do so)
- does **NOT** bring support for old Mycroft CommonPlay skills, that is achieved by using the `"ocp_legacy"` pipeline with ovos-core
- [ovos-media](https://github.com/OpenVoiceOS/ovos-media) will fully replace OCP in **ovos-audio 1.0.0**



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OpenVoiceOS/ovos-audio",
    "name": "ovos-audio",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/1b/59/2d3711063c5a63c92f89409c26e0fc56c5c67f2cbcf3b79852ff2325be24/ovos-audio-0.3.1.tar.gz",
    "platform": null,
    "description": "# ovos-audio\n\nThe \"mouth\" of the OVOS assistant!\n\nHandles TTS generation and sounds playback\n\n## Install\n\n`pip install ovos-audio[extras]` to install this package and the default plugins.\n\nWithout `extras`, you will also need to manually install, and possibly configure TTS modules as described below.\n\n# Configuration\n\nunder mycroft.conf\n\n```javascript\n{\n\n  // Text to Speech parameters\n  \"tts\": {\n    \"module\": \"ovos-tts-plugin-server\",\n    \"fallback_module\": \"ovos-tts-plugin-mimic\",\n    \"ovos-tts-plugin-mimic\": {\n        \"voice\": \"ap\"\n    }\n  },\n\n  // File locations of sounds to play for system events\n  \"sounds\": {\n    \"start_listening\": \"snd/start_listening.wav\",\n    \"end_listening\": \"snd/end_listening.wav\",\n    \"acknowledge\": \"snd/acknowledge.mp3\",\n    \"error\": \"snd/error.mp3\"\n  },\n\n  // Mechanism used to play WAV audio files\n  \"play_wav_cmdline\": \"paplay %1 --stream-name=mycroft-voice\",\n\n  // Mechanism used to play MP3 audio files\n  \"play_mp3_cmdline\": \"mpg123 %1\",\n\n  // Mechanism used to play OGG audio files\n  \"play_ogg_cmdline\": \"ogg123 -q %1\"\n}\n```\n\n## Using Legacy AudioService\n\nThe legacy audio service supports audio playback via the old mycroft api ([@mycroft](https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/skills/audioservice.py#L43) [@ovos](https://github.com/OpenVoiceOS/ovos-bus-client/blob/dev/ovos_bus_client/apis/ocp.py#L51))\n\nby default OCP delegates to the legacy audio service when necessary and no action is needed, but if you want to disable ocp this api can be used as the sole media playback provider\n\n> **NOTE:** once ovos-media is released OCP and this api will be disabled by default and deprecated!\n\n```javascript\n{\n    \"enable_old_audioservice\": true,\n    \"disable_ocp\": true,\n    \"Audio\": {\n        \"default-backend\": \"vlc\",\n        \"backends\": {\n          \"simple\": {\n            \"type\": \"ovos_audio_simple\",\n            \"active\": true\n          },\n          \"vlc\": {\n            \"type\": \"ovos_vlc\",\n            \"active\": true\n          }\n        }\n    }\n  },\n}\n```\n\nlegacy plugins:\n- [vlc](https://github.com/OpenVoiceOS/ovos-vlc-plugin)\n- [simple](https://github.com/OpenVoiceOS/ovos-audio-plugin-simple) (no https support)\n- [mpv](https://github.com/OpenVoiceOS/ovos-audio-plugin-mpv) <- recommended default\n- [chromecast](https://github.com/OpenVoiceOS/ovos-media-plugin-chromecast)\n- [spotify](https://github.com/OpenVoiceOS/ovos-media-plugin-spotify)\n\n**OCP technical details:**\n\n- OCP was developed for mycroft-core under the legacy audio service system\n- OCP is **always** the default audio plugin, unless you set `\"disable_ocp\": true` in config\n- OCP uses the legacy api internally, to delegate playback when GUI is not available (or when configured to do so)\n- does **NOT** bring support for old Mycroft CommonPlay skills, that is achieved by using the `\"ocp_legacy\"` pipeline with ovos-core\n- [ovos-media](https://github.com/OpenVoiceOS/ovos-media) will fully replace OCP in **ovos-audio 1.0.0**\n\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "ovos-core audio daemon client",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/OpenVoiceOS/ovos-audio"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a9b7760c081f95ade86a1d69142b20bcbe9b95e58c4f07d384e1cf7baf80e9d",
                "md5": "3f5930cca642c6809c063b05ccefeebf",
                "sha256": "cb4b6c83fb8081585ad54917ae50af1fff06bbe872823cd482f33fd13ca3a97b"
            },
            "downloads": -1,
            "filename": "ovos_audio-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f5930cca642c6809c063b05ccefeebf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 137358,
            "upload_time": "2024-11-05T03:49:07",
            "upload_time_iso_8601": "2024-11-05T03:49:07.860122Z",
            "url": "https://files.pythonhosted.org/packages/3a/9b/7760c081f95ade86a1d69142b20bcbe9b95e58c4f07d384e1cf7baf80e9d/ovos_audio-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b592d3711063c5a63c92f89409c26e0fc56c5c67f2cbcf3b79852ff2325be24",
                "md5": "f5a9afe26301ecec7a89b8b5da6d1062",
                "sha256": "44ceba45ec78cde52a3c0402cdf16c8c2faee1be98df1575539c99989fd3c170"
            },
            "downloads": -1,
            "filename": "ovos-audio-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f5a9afe26301ecec7a89b8b5da6d1062",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 138778,
            "upload_time": "2024-11-05T03:49:09",
            "upload_time_iso_8601": "2024-11-05T03:49:09.184405Z",
            "url": "https://files.pythonhosted.org/packages/1b/59/2d3711063c5a63c92f89409c26e0fc56c5c67f2cbcf3b79852ff2325be24/ovos-audio-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-05 03:49:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OpenVoiceOS",
    "github_project": "ovos-audio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ovos-audio"
}
        
Elapsed time: 0.57410s