Skip to content

docs: add audio example for create_speech, create_sfx and create_music - #176

Merged
edenreich merged 1 commit into
mainfrom
feat/issue-174-20261117-1939
Nov 17, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/issue-174-20261117-1939

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Adds a runnable audio example and README docs for create_speech, create_sfx and create_music.

  • examples/audio/main.py - generates speech, a text-to-sfx clip and an instrumental music clip, writing the returned bytes to speech.mp3, sfx.mp3 and music.mp3. When VIDEO_URL is set it also scores the video with create_sfx(model=..., video=..., output="sfx"). Models come from SPEECH_MODEL, SFX_MODEL, MUSIC_MODEL and VIDEO_SFX_MODEL env vars.
  • examples/audio/README.md - prerequisites (AUDIO_ENABLED=true, a provider with audio support such as openai, elevenlabs or mirelo), the 400 error from providers without support, which create_sfx arguments apply to text vs video, and response_format.
  • Root README.md - new "Audio" section with a create_speech snippet, plus the example in the "Examples" list. Also listed in examples/README.md.

Testing

  • python -m py_compile examples/audio/main.py passes.
  • task lint could not run: black/isort/mypy are not on PATH in this sandbox and installing dev dependencies needed approval. The new file follows the same structure and import order as examples/images/main.py.
  • Not run against a live gateway.

No generated code or API changes.

no docs ticket: internal-only refactor - this PR only adds SDK examples and README text, no public behavior changes.

Closes #174

Generated with Claude Code

@edenreich
edenreich merged commit c1f04d0 into main Nov 17, 2026
1 check passed
@edenreich
edenreich deleted the feat/issue-174-20261117-1939 branch November 17, 2026 19:43
inference-gateway-releaser Bot added a commit that referenced this pull request Nov 17, 2026
## [0.26.0](v0.25.0...v0.26.0) (2026-11-17)

### ✨ Features

* sync schemas v1.14.1 and accept standard OpenAI stream chunks ([#182](#182)) ([d4e2634](d4e2634)), closes [#181](#181)

### 🐛 Bug Fixes

* allow null stop_reason in Messages stream message_start ([#179](#179)) ([cb9440e](cb9440e))
* read stream chunks as JSON in chat examples ([#178](#178)) ([fca4630](fca4630)), closes [#172](#172)

### 👷 CI

* align Dependabot schedule and grouping ([#169](#169)) ([3f5ad19](3f5ad19))
* set up orchestrators from repos.yaml ([#170](#170)) ([bffe983](bffe983))

### 📚 Documentation

* add audio example for speech, sfx and music ([#176](#176)) ([c1f04d0](c1f04d0))
* add Responses API example and README section ([#180](#180)) ([ec0e02a](ec0e02a))
* sync examples and README with gateway config ([#177](#177)) ([ee0999d](ee0999d))

### 🔧 Miscellaneous

* **deps:** bump flox dependencies to latest ([#167](#167)) ([55f32c5](55f32c5))
* **deps:** bump flox dependencies to latest ([#168](#168)) ([de020e9](de020e9))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.26.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] docs: add an audio example for create_speech, create_sfx and create_music

1 participant