Add text-to-speech and text-to-audio task helpers for WaveSpeed provider - #2379
Open
chengzeyi wants to merge 1 commit into
Open
Add text-to-speech and text-to-audio task helpers for WaveSpeed provider#2379chengzeyi wants to merge 1 commit into
chengzeyi wants to merge 1 commit into
Conversation
WaveSpeed serves TTS models (e.g. microsoft/VibeVoice-1.5B) and music/audio generation models (e.g. ACE-Step) behind the same async task API already used by its image/video helpers. This adds WavespeedAITextToSpeechTask (sends the input text as `text`) and WavespeedAITextToAudioTask (sends it as `prompt`, matching the existing base payload), both reusing the shared polling logic. textToSpeech() previously called getResponse() without url/headers, which only works for providers that return audio synchronously; WaveSpeed's helper needs them to poll the task result. Pass them the same way textToAudio() already does (providers that ignore them are unaffected). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139Zu5TfHzGVyPeatY9HJAR
chengzeyi
requested review from
SBrandeis,
hanouticelina and
julien-c
as code owners
August 16, 2026 08:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
text-to-speechandtext-to-audiotask support for thewavespeedinference provider:WavespeedAITextToSpeechTask— sends the input text astext(the field WaveSpeed TTS endpoints such aswavespeed-ai/vibevoiceandchatterbox/text-to-speechexpect), mirroring how the fal.ai TTS helper handles the same translation.WavespeedAITextToAudioTask— reuses the base payload (prompt= inputs), matching WaveSpeed music/audio endpoints such aswavespeed-ai/ace-step/prompt-to-audio.Both reuse the existing WaveSpeed submit-and-poll response handling already used by the image/video helpers.
Fix in
textToSpeech()textToSpeech()calledproviderHelper.getResponse(res, undefined, undefined, ...)without url/headers. That works for providers that return audio synchronously (fal, replicate), but WaveSpeed's helper polls an async task result and requires them. This PR passes url/headers the same waytextToAudio()already does; providers that ignore these arguments are unaffected.Why
WaveSpeed serves several audio models whose HF Hub counterparts currently have no inference provider at all (e.g.
microsoft/VibeVoice-1.5B,Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice,k2-fsa/OmniVoice,ACE-Step/Ace-Step1.5,MiniMaxAI/MiniMax-Music3). We'd like to register those model mappings, which requires client support for the tasks first.Testing
pnpm run check,pnpm run lint,pnpm run buildpass inpackages/inference.textToSpeech/textToAudiocases to the WaveSpeed block inInferenceClient.spec.ts.textToSpeech(VibeVoice) returned anaudio/mpegblob,textToAudio(ACE-Step prompt-to-audio) returned anaudio/wavblob.I'm the maintainer on the WaveSpeed side (we operate the
wavespeedprovider). cc @Wauplin @SBrandeis @hanouticelina🤖 Generated with Claude Code
https://claude.ai/code/session_0139Zu5TfHzGVyPeatY9HJAR
Note
Low Risk
Scoped provider additions plus aligning textToSpeech with an existing textToAudio pattern; no auth or data-model changes.
Overview
Adds WaveSpeed support for
text-to-speechandtext-to-audio, wiring new task helpers into the provider registry and reusing the existing submit-and-pollBlobflow used for other WaveSpeed media tasks.WavespeedAITextToSpeechTaskmaps clientinputsto the APItextfield (for endpoints like VibeVoice);WavespeedAITextToAudioTaskkeeps the defaultprompt-style payload for music/prompt-to-audio routes. Integration tests cover VibeVoice TTS and ACE-Step text-to-audio.textToSpeech()now passes request URL and headers intogetResponse, matchingtextToAudio(), so async providers (including WaveSpeed) can poll task status; synchronous providers that ignore those args stay unchanged.Reviewed by Cursor Bugbot for commit 7e94f0c. Bugbot is set up for automated code reviews on this repo. Configure here.