Skip to main content

ovos-core audio daemon client

Project description

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

{

  // 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"
}

🤖 Persona Support

This project supports dialog-transformer plugins to customize the style or tone of the generated speech.

By using OpenAI Persona Plugin, you can rewrite text dynamically based on specific personas, such as simplifying explanations or mimicking a specific tone.

Example Usage:

  • Persona: "rewrite the text as if you were explaining it to a 5-year-old"
  • Input: "Quantum mechanics is a branch of physics that describes the behavior of particles at the smallest scales."
  • Output: "Quantum mechanics is like a special kind of science that helps us understand really tiny things."

Examples of persona Values:

  • "rewrite the text as if it was an angry old man speaking"
  • "Add more 'dude'ness to it"
  • "Explain it like you're teaching a child"

To enable the OpenAI Persona Plugin, add the following to your mycroft.conf:

"dialog_transformers": {
    "ovos-dialog-transformer-openai-plugin": {
        "rewrite_prompt": "rewrite the text as if you were explaining it to a 5-year-old"
    }
}

Using Legacy AudioService

The legacy audio service supports audio playback via the old mycroft api (@mycroft @ovos)

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!

{
    "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:

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 will fully replace OCP in ovos-audio 1.0.0

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

ovos_audio-1.2.1a1.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_audio-1.2.1a1-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file ovos_audio-1.2.1a1.tar.gz.

File metadata

  • Download URL: ovos_audio-1.2.1a1.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ovos_audio-1.2.1a1.tar.gz
Algorithm Hash digest
SHA256 6b8fff6ba83b43914d97725e745f43ecf704ad750534c60d207eb80e04be9f42
MD5 965143cc91ac6a12b6de48d67d819dff
BLAKE2b-256 27c3f8496945dfd2f6b88c9bdaf09c9eeb12b4e8e2deaf2366c19c3269f5d384

See more details on using hashes here.

File details

Details for the file ovos_audio-1.2.1a1-py3-none-any.whl.

File metadata

  • Download URL: ovos_audio-1.2.1a1-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ovos_audio-1.2.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a3171749c5f9b31703675021395a23526dbff249dc0e1652e1b35608023a91f
MD5 b106b743745fa7430da5c701520a8892
BLAKE2b-256 31efae37544ced754a4eb6919a82692c625552ac57d81159f6325150beac8d7a

See more details on using hashes here.

Supported by

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