chore: update OpenAPI schema#95
Conversation
📝 WalkthroughWalkthroughThe OpenAPI spec for ChangesTTS Model Documentation Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api-reference/openapi.json`:
- Around line 2591-2594: The label for the multi-speaker bash example currently
reads "Multi Speaker (S2.1 Pro only)" which incorrectly restricts the feature to
only the paid tier. Update this label to remove the "Pro only" restriction and
clarify that multi-speaker synthesis is supported on both s2.1-pro and
s2.1-pro-free models, since the example curl command correctly demonstrates the
feature working with s2.1-pro-free.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 871884b6-3e12-403f-a0e8-8909087f96b1
📒 Files selected for processing (1)
api-reference/openapi.json
| { | ||
| "lang": "bash", | ||
| "label": "Multi Speaker (S2-Pro only)", | ||
| "source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer <token>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2-pro' \\\n --data '{\n \"text\": \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'" | ||
| "label": "Multi Speaker (S2.1 Pro only)", | ||
| "source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer <token>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor
🧩 Analysis chain
🌐 Web query:
Fish Audio TTS multi-speaker support s2.1-pro-free vs s2.1-pro model
💡 Result:
Both the s2.1-pro and s2.1-pro-free models are variations of the same Fish Audio S2.1-Pro architecture [1][2], which supports multi-speaker dialogue synthesis [3][4]. The capability is a core feature of the S2-Pro series, not a differentiator between the paid and free tiers [3][5][4]. To utilize multi-speaker support, you must use the s2-pro model identifier [6][4] (which represents the S2.1-Pro series) and format your request as follows: 1. Text Formatting: Use inline speaker tags, such as <|speaker:0|> and <|speaker:1|>, within your text to indicate speaker changes [3][5][1]. 2. Voice Mapping: Instead of providing a single reference_id or voice, you must provide an array of model IDs (e.g., ["speaker-a-id", "speaker-b-id"]) that correspond to the speaker indices defined in your text [3][5][1]. The model handles turn-taking, pacing, and natural pauses between the speakers automatically [5]. Note that the speech.voices (array) and speech.voice (singular) parameters are mutually exclusive; using the array format is required to enable the multi-speaker functionality [5][1]. The s2.1-pro-free tier provides access to these same technical capabilities, typically optimized for development, testing, or lower-latency needs [2].
Citations:
- 1: https://runware.ai/docs/models/fish-audio-s2-1-pro
- 2: https://fish.audio/blog/s2-1-pro-free-api/
- 3: https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech
- 4: https://docs.fish.audio/developer-guide/models-pricing/models-overview
- 5: https://runware.ai/docs/models/fish-audio-s2-1-pro/guides/multi-speaker-dialogue
- 6: https://docs.fish.audio/features/text-to-speech
🏁 Script executed:
# Find and verify the openapi.json file
fd -name "openapi.json" -type f
# Check lines 2591-2594 and surrounding context
sed -n '2585,2600p' api-reference/openapi.jsonRepository: fishaudio/docs
Length of output: 2370
Update the label to remove the "Pro only" restriction; multi-speaker is supported on both s2.1-pro and s2.1-pro-free.
The label reads "Multi Speaker (S2.1 Pro only)" but according to Fish Audio's documentation, multi-speaker synthesis is a core feature available on both the s2.1-pro and s2.1-pro-free models—it is not exclusive to the paid tier. The curl sample correctly uses s2.1-pro-free, but the label is misleading and should be updated to reflect that multi-speaker works on both tier variants.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@api-reference/openapi.json` around lines 2591 - 2594, The label for the
multi-speaker bash example currently reads "Multi Speaker (S2.1 Pro only)" which
incorrectly restricts the feature to only the paid tier. Update this label to
remove the "Pro only" restriction and clarify that multi-speaker synthesis is
supported on both s2.1-pro and s2.1-pro-free models, since the example curl
command correctly demonstrates the feature working with s2.1-pro-free.
Auto-generated update from https://api.fish.audio/openapi.json
Summary by CodeRabbit
s2-pro,s2.1-pro,s2.1-pro-free) for TTS requests.s2.1-pro-freefor text-to-speech endpoints.