Skip to main content

Add your description here

Project description

Wyoming Microsoft TTS

Wyoming protocol server for Microsoft Azure text-to-speech.

This Python package provides a Wyoming integration for Microsoft Azure text-to-speech and can be directly used with Home Assistant voice and Rhasspy.

Azure Speech Service

This program uses Microsoft Azure Speech Service. You can sign up to a free Azure account which comes with free tier of 500K characters per month, this should be enough for running a voice assistant as each command is relatively short. Plus, on Home Assistant the outputs are cached so each response will only be requested once. Once this amount is exceeded Azure could charge you for each second used (Current pricing is $0.36 per audio hour). I am not responsible for any incurred charges and recommend you set up a spending limit to reduce your exposure. However, for normal usage the free tier could suffice and the resource should not switch to a paid service automatically.

If you have not set up a speech resource, you can follow the instructions below. (you only need to do this once and works both for Speech-to-Text and Text-to-Speech)

  1. Sign in or create an account on portal.azure.com.
  2. Create a subscription by searching for subscription in the search bar. Consult Microsoft Learn for more information.
  3. Create a speech resource by searching for speech service.
  4. Select the subscription you created, pick or create a resource group, select a region, pick an identifiable name, and select the pricing tier (you probably want Free F0)
  5. Once created, copy one of the keys from the speech service page. You will need this to run this program.

Installation

Depending on your use case there are different installation options.

  • Using pip Clone the repository and install the package using pip. Please note the platform requirements as noted here.

    pip install .
    
  • Home Assistant Add-On Add the following repository as an add-on repository to your Home Assistant, or click the button below. https://github.com/hugobloem/homeassistant-addons

    Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

  • Docker container To run as a Docker container use the following command:

    docker run ghcr.io/hugobloem/wyoming-microsoft-tts-noha:latest --<key> <value>
    

    For the relevant keys please look at the table below

  • docker compose

    Below is a sample for a docker compose file. The azure region + subscription key can be set in environment variables. Everything else needs to be passed via command line arguments.

    wyoming-proxy-azure-tts:
      image: ghcr.io/hugobloem/wyoming-microsoft-tts-noha
      container_name: wyoming-azure-tts
      ports:
        - "10200:10200"
      environment:
        AZURE_SERVICE_REGION: swedencentral
        AZURE_SUBSCRIPTION_KEY: XXX
      command: --voice=en-GB-SoniaNeural --uri=tcp://0.0.0.0:10200
    

Usage

Depending on the installation method parameters are parsed differently. However, the same options are used for each of the installation methods and can be found in the table below. Your service region and subscription key can be found on the speech service resource page (step 5 the Azure Speech service instructions).

For the bare-metal Python install the program is run as follows:

python -m wyoming-microsoft-tts --<key> <value>
Key Optional Description
service-region No Azure service region e.g., uksouth
subscription-key No Azure subscription key
uri No Uri where the server will be broadcasted e.g., tcp://0.0.0.0:10200
download-dir Yes Directory to download voices.json into (default: /tmp/)
voice Yes Default voice to set for transcription, default: en-GB-SoniaNeural
auto-punctuation Yes Automatically add punctuation (default: ".?!")
samples-per-chunk Yes Number of samples per audio chunk (default: 1024)
update-voices Yes Download latest languages.json during startup
debug Yes Log debug messages

Project details


Download files

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

Source Distribution

wyoming_microsoft_tts-1.4.5.tar.gz (40.2 kB view details)

Uploaded Source

Built Distribution

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

wyoming_microsoft_tts-1.4.5-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file wyoming_microsoft_tts-1.4.5.tar.gz.

File metadata

  • Download URL: wyoming_microsoft_tts-1.4.5.tar.gz
  • Upload date:
  • Size: 40.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wyoming_microsoft_tts-1.4.5.tar.gz
Algorithm Hash digest
SHA256 7c0c19956cdebef1ba42774c8a9a093019c88ae510d5d578098c2c48c342c9b3
MD5 4bfa075048c0be674ac99a8f125f450a
BLAKE2b-256 42ce35c915bc75ef8544597245d327e00d935cb8e0d7969a0cb78fdc548f7021

See more details on using hashes here.

File details

Details for the file wyoming_microsoft_tts-1.4.5-py3-none-any.whl.

File metadata

  • Download URL: wyoming_microsoft_tts-1.4.5-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wyoming_microsoft_tts-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9f6d88e6110ca1af59eb0b055e58fde5f3af9ce3ae38a52604545215a22ce9b8
MD5 34ede165cac30a191e03b3e3e035f522
BLAKE2b-256 7f5f38e6b415c2c4a631c64daae864c11ea4157a9bda5b69aab1a26c21eba22d

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