Skip to content

feat(tts): add modern OpenAI audio providers#83

Open
RayJiang4S wants to merge 2 commits into
calesthio:mainfrom
RayJiang4S:ray/openai-audio-tts-provider
Open

feat(tts): add modern OpenAI audio providers#83
RayJiang4S wants to merge 2 commits into
calesthio:mainfrom
RayJiang4S:ray/openai-audio-tts-provider

Conversation

@RayJiang4S

Copy link
Copy Markdown

Summary

  • add openai_audio_tts for audio-output chat models such as gpt-audio-1.5
  • refresh openai_tts to use the current Speech API REST surface and updated voice/model options
  • document OpenAI provider options and keep tts_selector ranking constrained by allowed providers

Tests

  • python -m pytest -q tests/tools/test_openai_tts.py tests/tools/test_openai_audio_tts.py tests/contracts/test_phase3_contracts.py

Add an audio-output TTS provider for gpt-audio-1.5, refresh the existing OpenAI speech provider to use the current REST API surface, and document provider selection behavior for narration workflows.
@RayJiang4S RayJiang4S requested a review from calesthio as a code owner May 22, 2026 02:40
Allow TTS selector callers to prefer an exact provider tool and route OpenAI requests to the audio-output chat path when requested. Record OpenAI audio instruction metadata for review manifests.
@RayJiang4S

Copy link
Copy Markdown
Author

Updated this PR with a routing fix from the recent multi-provider TTS audition workflow.

What changed:

  • Added preferred_tool to tts_selector so callers can explicitly request openai_audio_tts instead of relying only on provider-level matching.
  • Added prefer_audio_output so preferred_provider: \"openai\" can intentionally route to the openai_audio chat-audio path.
  • Recorded instructions_applied and strict_script in openai_audio_tts output metadata for review/audit pages.
  • Documented the selector routing knobs in docs/PROVIDERS.md.

Validation:

  • .venv/bin/python -m pytest tests/tools/test_openai_tts.py tests/tools/test_openai_audio_tts.py -q passed: 8 tests.
  • .venv/bin/python -m pytest tests/contracts/test_phase3_contracts.py -q passed: 63 tests.
  • .venv/bin/python -m py_compile tools/audio/openai_tts.py tools/audio/openai_audio_tts.py tools/audio/tts_selector.py tests/tools/test_openai_tts.py tests/tools/test_openai_audio_tts.py passed.
  • git diff --check passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant