Skip to content

This pull request updates the azure-ai-openai SDK to align with the latest OpenAI Speech API enhancements. #45844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zuoxinwang
Copy link

Description

This pull request updates the azure-ai-openai SDK to align with the latest OpenAI Speech API enhancements. The following changes are included:

1. Extended SpeechVoice Class

Added five new predefined constants to support additional voice options:

  • Ash
  • Ballad
  • Coral
  • Sage
  • Verse

These new voices reflect recent updates to OpenAI's supported voice set and provide more expressive output options.

2. Added instructions Parameter to SpeechGenerationOptions

Introduced an optional instructions field to the SpeechGenerationOptions class. This allows users to provide high-level behavioral guidance for speech synthesis, as defined by OpenAI's latest spec.

3. Test Enhancements

  • Added unit tests covering new SpeechVoice constants.
  • Added validation and functional tests for the new instructions parameter.
  • All existing test suites pass, and new features are covered by regression tests.

All changes are backward-compatible. This update ensures the SDK remains consistent with upstream API specifications.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. OpenAI labels Jun 26, 2025
Copy link
Contributor

Thank you for your contribution @zuoxinwang! We will review the pull request and get back to you soon.

@zuoxinwang
Copy link
Author

@microsoft-github-policy-service agree

@zuoxinwang
Copy link
Author

Hi @jpalvarezl, @brandom-msft

Could you please take a moment to review this PR when convenient?

This change introduces support for TTS voice customization via an instructions field, and adds predefined voice constants (SAGE, SHIMMER, VERSE) to improve usability.

Please let me know if there are any changes needed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. OpenAI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant