Skip to main content

Azure Voice List

azure_voice_list is a Python package that integrates with Azure Cognitive Services Speech SDK to retrieve available voices.

Features

  • Retrieve available voices from Azure Speech SDK
  • Save voice attributes to a text file
  • Execute as a command-line tool for quick access
  • Use as a standalone Python script within your projects

Installation

You can install azure_voice_list via PyPI using pip:

pip install azure_voice_list

Usage

1. Importing and Using in Python Scripts

You can easily integrate azure_voice_list into your Python projects by importing the necessary functions.

from azure_voice_list import get_available_voices

# Set your Azure credentials
speech_key = "YOUR_AZURE_SPEECH_KEY"
service_region = "YOUR_AZURE_SERVICE_REGION"

voices = get_available_voices(speech_key, service_region)
if voices:
    for voice in voices:
        print(voice)

2. Executing as a Command-Line Tool

Running azure_voice_list as a command-line tool allows you to retrieve and save voice attributes without writing additional Python code.

a. Install the Package

You can install azure_voice_list via PyPI using pip:

pip install azure_voice_list

b. Run the Command-Line Tool

Once installed, you can execute the tool from your terminal:

azure-voice-list

Example Output:

Voice attributes have been saved to 'output/voice_attributes_20230927_123456.txt'

c. Provide Azure Credentials

The command-line tool relies on environment variables for Azure credentials. Ensure you have a .env file in your project's root directory with the following content:

AZURE_SPEECH_KEY=your_azure_speech_key
AZURE_SPEECH_REGION=your_azure_service_region

Alternatively, you can set these environment variables in your system.

3. Executing as a Standalone Python Script

If you prefer to run azure_voice_list without installing it as a package, you can execute the script directly using Python.

a. Clone the Repository

First, clone the repository to your local machine:

git clone https://github.com/BlueBirdBack/azure_voice_list.git
cd azure_voice_list

b. Install the Package

Install the package and its dependencies using pip:

pip install .

c. Run the Script

Execute the main.py script using Python:

azure-voice-list

Example Output:

Voice attributes have been saved to 'output/voice_attributes_20230927_123456.txt'

d. Provide Azure Credentials

Similar to the command-line tool, ensure that the .env file with your Azure credentials is present in the project root directory:

AZURE_SPEECH_KEY=your_azure_speech_key
AZURE_SPEECH_REGION=your_azure_service_region

Alternatively, set the environment variables in your system.

Output Directory

By default, the azure_voice_list tool saves the voice attributes to an output directory located at the root of the project. If you encounter multiple output directories, ensure you're running the tool from the project root and verify the configuration in the script.

License

MIT

Additional Information

Metadata

Release files for azure-voice-list 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azure-voice-list 0.1.0
File Size Uploaded
azure_voice_list-0.1.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for azure-voice-list 0.1.0
File Interpreter ABI Platform
azure_voice_list-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / azure_voice_list-0.1.0.tar.gz

Download URL azure_voice_list-0.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6ed684e9beaed2f59e97392d719b77f9ef9bbc7053d39ac9f62b7c14599be804
BLAKE2b-256 checksum
How to use checksums
aec9a8fa7a78ae6dbd2af5ce5da3437648310b1c01d622d0d27e47ea06cb5841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / azure_voice_list-0.1.0-py3-none-any.whl

Download URL azure_voice_list-0.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94d4b9838b2e2ef3dd16f1150c6f2d4c619b33bf5c330c1a7fc1a00cf4b91a23
BLAKE2b-256 checksum
How to use checksums
d587c6767098952a7cf6df476f870dd03ea3ac65273d39c1bc0edaaeda85ee12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page