Skip to main content

Wyoming Server for Azure AI Speech

Project description

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:

Add to Home Assistant

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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

wyoming_azure_speech-0.1.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file wyoming_azure_speech-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wyoming_azure_speech-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24aaed23631a1a33583535b16a383c533e38e49a134e52279ed2b0097f0bf9dc
MD5 1a279dfb1d3f0a58238a5bc0412aa17a
BLAKE2b-256 14320844daa509c9bab082741eec353f9d952371deb0c4f09cfeaa20f6a3a715

See more details on using hashes here.

Provenance

The following attestation bundles were made for wyoming_azure_speech-0.1.1-py3-none-any.whl:

Publisher: release.yml on shmuelzon/wyoming-azure-speech

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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