Skip to content

chore: update OpenAPI schema#95

Open
fishaudio-bot wants to merge 1 commit into
mainfrom
chore/update-openapi-schema
Open

chore: update OpenAPI schema#95
fishaudio-bot wants to merge 1 commit into
mainfrom
chore/update-openapi-schema

Conversation

@fishaudio-bot

@fishaudio-bot fishaudio-bot commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Auto-generated update from https://api.fish.audio/openapi.json

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The OpenAPI spec for POST /v1/tts and POST /v1/tts/stream/with-timestamp updates the model header default, description, and enum to s2.1-pro-free, and refreshes the curl samples to match.

Changes

TTS Model Documentation Update

Layer / File(s) Summary
model parameter schema updates for both TTS endpoints
api-reference/openapi.json
For both POST /v1/tts and POST /v1/tts/stream/with-timestamp, the model header description now references s2.1-pro-free, the default changes from s2-pro to s2.1-pro-free, and the enum expands to include s2.1-pro and s2.1-pro-free.
curl code sample updates for both TTS endpoints
api-reference/openapi.json
x-codeSamples curl commands for POST /v1/tts and POST /v1/tts/stream/with-timestamp use model: s2.1-pro-free; the multi-speaker label becomes Multi Speaker (S2.1 Pro only).

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • fishaudio/docs#51: Directly edits the TTS model enum in openapi.json for POST /v1/tts.
  • fishaudio/docs#55: Modifies the POST /v1/tts model header documentation and examples in the same OpenAPI file.

Suggested reviewers: twangodev

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: an OpenAPI schema update.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-openapi-schema

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 10493bf and 87f8fd9.

📒 Files selected for processing (1)
  • api-reference/openapi.json

Comment on lines 2591 to +2594
{
"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 }'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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:


🏁 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.json

Repository: 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.

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