feat: add OrcaRouter streaming text-to-speech example for MOSS-TTS-Realtime - #206
Open
clementguarino06510-glitch wants to merge 1 commit into
Conversation
…altime Add example_orcarouter_stream_to_tts.py, mirroring example_llm_stream_to_tts.py but sourcing streaming text deltas from OrcaRouter's OpenAI-compatible chat completions endpoint, and document it in the MOSS-TTS-Realtime model card.
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
moss_tts_realtime/example_orcarouter_stream_to_tts.py, mirroringexample_llm_stream_to_tts.pybut sourcing the streaming text deltas from OrcaRouter — an OpenAI-compatible AI gateway for models and agents — instead of a simulated generator. OrcaRouter exposes a provider/model namespace (e.g.deepseek/deepseek-chat,orcarouter/autofor adaptive routing) behind a single base URL, so MOSS-TTS-Realtime users get a real LLM text stream into the same streaming TTS pipeline. It also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.Documented in the MOSS-TTS-Realtime model card (
docs/moss_tts_realtime_model_card.md) next to the existing single-turn streaming usage.Validation
python3 -m py_compilepasses on the new example.orcarouter_text_stream()against OrcaRouter's/v1/chat/completions(HTTP 200, streamed text deltas).I'm an engineer on the OrcaRouter team.
Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter