Wyoming Azure Speech
This project implements a Wyoming protocol server backed by Microsoft Azure's AI Speech services for speech-to-text transcription and text-to-speech synthesization.
It includes both a Python package and a pre-built Docker image for simpler integration.
Prerequisites
In order to use the Azure AI Speech Service, one must sign up for a (free) account on Azure at https://portal.azure.com/. As of the writing of this document, the free tier offers 5 hours for speech-to-text conversion per month and 0.5 million characters of text-to-speech. Only when those are exceeded, you will be billed. For more information, check out the Speech Services pricing.
Before running the Wyoming server, you need to provide it with the Azure region serving the Speech Service as well as a subscription key. Those can be generated by performing the following:
- Create an account at Azure
- Add a new subscription
- Create a new Speech service
- Create a new resource group
- Choose the region closest to you
- Choose the "Free F0" pricing tier
- Make a note of one of the generated keys and the region name for later
Installation
Running the server
Manual
Install and the package:
pip install wyoming-azure-speech
wyoming-azure-speech --key <KEY> --region <REGION>
Docker
Pull image and run:
docker run ghcr.io/shmuelzon/wyoming-azure-speech:latest --key <KEY> --region <REGION>
Docker Compose
services:
wyoming-azure-speech:
container_name: wyoming-azure-speech
image: ghcr.io/shmuelzon/wyoming-azure-speech:latest
restart: unless-stopped
pull_policy: always
environment:
AZURE_KEY_FILE: /run/secrets/azure_key
AZURE_REGION_FILE: /run/secrets/azure_region
secrets:
- azure_key
- azure_region
secrets:
azure_key:
file: secrets/azure_key.txt
azure_region:
file: secrets/azure_region.txt
Add to Home Assistant
You can either click on the image or follow the manual procedure below:
- Browse to your Home Assistant instance
- Go to Settings > Devices & Services
- In the bottom right corner, select the + Add Integration button
- From the list, select Wyoming Protocol.
- Enter the IP and port that the Wyoming server is listening on
Configuration
The server allows the following configuration options:
| Name | Description | Default Value | Optional environment variable |
|---|---|---|---|
key |
Azure subscription key | AZURE_KEY or AZURE_KEY_FILE to read it from a file |
|
region |
Azure region name | AZURE_REGION or AZURE_REGION_FILE to read it from a file |
|
uri |
A URI the server will listen on | tcp://0.0.0.0:10300 |
|
transcription-language |
Default language for transcription | en-US |
|
voice |
Default voice for synthesizing | en-US-AvaMultilingualNeural |
|
debug |
Enable debug logs | False |
|
log-format |
The format used for printing log messages | %(asctime)s:%(levelname)s:%(name)s:%(message)s |
Metadata
Release files for wyoming-azure-speech 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wyoming_azure_speech-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / wyoming_azure_speech-0.1.1-py3-none-any.whl
| Download URL | wyoming_azure_speech-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24aaed23631a1a33583535b16a383c533e38e49a134e52279ed2b0097f0bf9dc
|
|
BLAKE2b-256 checksum How to use checksums |
14320844daa509c9bab082741eec353f9d952371deb0c4f09cfeaa20f6a3a715
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 22, 2024.
Transparency logSecurity for wyoming-azure-speech 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 1 file in this release has been uploaded with provenance metadata.
Attestation for wyoming_azure_speech-0.1.1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 22, 2024.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.