Skip to content

Conversation

@fishaudio-bot
Copy link
Collaborator

@fishaudio-bot fishaudio-bot commented Dec 25, 2025

Auto-generated API documentation update from fish-audio-go@9c003ae3706282cf4525a19422ce23079b920b44

Changes

  • Updated API reference documentation for Go SDK
  • Generated from latest doc comments in the codebase

@coderabbitai
Copy link

coderabbitai bot commented Dec 25, 2025

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new comprehensive Go SDK API reference MDX at api-reference/sdk/go/api-reference.mdx documenting constants, error types, data structures, service interfaces and clients, streaming/I/O primitives, parameter/config types, builder-style client configuration, and usage examples. Documentation-only; no code or public API changes.

Changes

Cohort / File(s) Summary
Go SDK Documentation
api-reference/sdk/go/api-reference.mdx
Adds a large MDX API reference for the Fish Audio Go SDK covering constants, error types, core data structures, service interfaces and implementations (ASRService, TTSService, VoicesService, AccountService), streaming and WebSocket I/O primitives (AudioStream, WebSocketAudioStream), params/configs (TranscribeParams, ConvertParams, TTSConfig, StreamParams, etc.), builder-style client creation (NewClient, WithBaseURL, WithTimeout), examples, and cross-references.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • twangodev

Poem

🐇 I hopped through docs with pencil in paw,
Types and streams laid out like law.
Clients and params in tidy rows,
Examples planted where knowledge grows.
A carrot for readers — onward it goes. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update Go SDK API Reference' directly and clearly summarizes the main change: adding/updating API reference documentation for the Go SDK.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto/go-api-docs

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
api-reference/sdk/go/api-reference.mdx (3)

1-5: Frontmatter title is generic; consider more descriptive wording.

The title "API Reference" is broad. Consider using "Go SDK API Reference" or "Fish Audio Go SDK API Reference" for clarity and SEO.


116-217: Verify that all code examples have been tested before publishing.

Per documentation guidelines, all code examples must be tested before publishing to ensure accuracy and prevent misleading users. While the examples appear syntactically reasonable, there is no evidence in the PR context that they have been validated against a live SDK or test environment.

Examples that should be verified:

  • Transcribe example (lines 118–124)
  • GetCredits example (lines 148–151)
  • GetPackage example (lines 162–167)
  • AudioStream iteration examples (lines 199–216)

Do you have test results or CI validation that confirms these examples run successfully against the SDK? If not, I can help create a verification script to test them.


896-906: Ensure comprehensive examples for key services.

While the document provides examples for some methods (Transcribe, GetCredits, GetPackage, AudioStream), other commonly-used methods lack detailed usage examples:

  • TTSService.Convert() (line 760): Signature documented but no example
  • TTSService.Stream() (line 769): Signature documented but no example
  • VoicesService.List() (line 939): Signature documented but no example

Consider adding concise examples for these high-value methods to improve developer experience, especially for TTS operations which are likely primary use cases.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between decef17 and c727a02.

📒 Files selected for processing (1)
  • api-reference/sdk/go/api-reference.mdx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.mdx

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.mdx: Document just enough for user success - not too much, not too little
Prioritize accuracy and usability of information
Make content evergreen when possible
Search for existing information before adding new content. Avoid duplication unless it is done for a strategic reason
Check existing patterns for consistency
Include title in YAML frontmatter: Clear, descriptive page title
Include description in YAML frontmatter: Concise summary for SEO/navigation
Use second-person voice ("you") in documentation content
Include prerequisites at the start of procedural content
Test all code examples before publishing
Match style and formatting of existing pages
Include both basic and advanced use cases in documentation
Include language tags on all code blocks
Include alt text on all images
Use relative paths for internal links
Never use emojis in professional content
Do not skip frontmatter on any MDX file
Do not use absolute URLs for internal links
Do not include untested code examples

Files:

  • api-reference/sdk/go/api-reference.mdx
🪛 GitHub Check: Mintlify Validation (hanabiaiinc) - vale-spellcheck
api-reference/sdk/go/api-reference.mdx

[warning] 9-9: api-reference/sdk/go/api-reference.mdx#L9
Did you really mean 'fishaudio'?


[warning] 34-34: api-reference/sdk/go/api-reference.mdx#L34
Did you really mean 'APIError'?


[warning] 36-36: api-reference/sdk/go/api-reference.mdx#L36
Did you really mean 'APIError'?


[warning] 65-65: api-reference/sdk/go/api-reference.mdx#L65
Did you really mean 'ASRResponse'?


[warning] 67-67: api-reference/sdk/go/api-reference.mdx#L67
Did you really mean 'ASRResponse'?


[warning] 81-81: api-reference/sdk/go/api-reference.mdx#L81
Did you really mean 'ASRSegment'?


[warning] 83-83: api-reference/sdk/go/api-reference.mdx#L83
Did you really mean 'ASRSegment'?


[warning] 97-97: api-reference/sdk/go/api-reference.mdx#L97
Did you really mean 'ASRService'?


[warning] 99-99: api-reference/sdk/go/api-reference.mdx#L99
Did you really mean 'ASRService'?


[warning] 328-328: api-reference/sdk/go/api-reference.mdx#L328
Did you really mean 'apiKey'?


[warning] 712-712: api-reference/sdk/go/api-reference.mdx#L712
Did you really mean 'TTSConfig'?


[warning] 714-714: api-reference/sdk/go/api-reference.mdx#L714
Did you really mean 'TTSConfig'?


[warning] 746-746: api-reference/sdk/go/api-reference.mdx#L746
Did you really mean 'TTSService'?


[warning] 748-748: api-reference/sdk/go/api-reference.mdx#L748
Did you really mean 'TTSService'?


[warning] 783-783: api-reference/sdk/go/api-reference.mdx#L783
Did you really mean 'textChan'?

🪛 LanguageTool
api-reference/sdk/go/api-reference.mdx

[grammar] ~781-~781: Use a hyphen to join words.
Context: ...error) ``` StreamWebSocket streams text to speech over WebSocket for real-time ...

(QB_NEW_EN_HYPHEN)


[grammar] ~781-~781: Use a hyphen to join words.
Context: ...or) ``` StreamWebSocket streams text to speech over WebSocket for real-time gen...

(QB_NEW_EN_HYPHEN)


[grammar] ~899-~899: Ensure spelling is correct
Context: ...cesService"> ## type VoicesService VoicesService provides voice management operations. ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@api-reference/sdk/go/api-reference.mdx`:
- Around line 118-124: The examples currently drop and ignore errors
(os.ReadFile and the returned err from client.ASR.Transcribe and similar
examples like GetCredits and GetPackage); update the Go SDK doc comments that
generate these snippets so each example checks and handles errors instead of
discarding them — e.g., capture the error from os.ReadFile (not `_`), check and
handle err after client.ASR.Transcribe (and likewise in GetCredits/GetPackage),
and mirror the AudioStream example’s pattern (log or return the error) so
generated docs show correct error handling for functions such as os.ReadFile,
client.ASR.Transcribe, GetCredits, GetPackage and AudioStream.
🧹 Nitpick comments (1)
api-reference/sdk/go/api-reference.mdx (1)

7-13: Consider adding a brief introduction with prerequisites.

The reference jumps straight into the import statement without context. A short intro paragraph noting the prerequisites (Go version requirement, installation command like go get github.com/fishaudio/fish-audio-go, and API key setup via FISH_API_KEY) would help users who land on this page directly. As per coding guidelines, "Include prerequisites at the start of procedural content."

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@api-reference/sdk/go/api-reference.mdx`:
- Around line 118-124: The fenced code blocks for the Go examples (e.g., the
block containing "audio, _ := os.ReadFile(...)", "client.ASR.Transcribe",
"fishaudio.TranscribeParams", and other SDK examples) are missing the "go"
language tag; update each affected fenced block to start with ```go instead of
``` to restore proper Go syntax highlighting. Because these examples are
generated by gomarkdoc, fix the upstream Go doc comments (the example code in
the Go SDK source that includes these snippets) so gomarkdoc emits ```go fences,
or if a local quick fix is required, add the ```go tag directly to the generated
api-reference/sdk/go/api-reference.mdx code fences for each example block.
🧹 Nitpick comments (1)
api-reference/sdk/go/api-reference.mdx (1)

7-9: Consider adding a brief introductory sentence.

The page jumps directly into # fishaudio with no introductory context. A one-line intro such as "Complete API reference for the Fish Audio Go SDK (fish-audio-go)" before the import block would help orient users, and aligns with the guideline to use second-person voice (e.g., "You can use this reference to…").

Since the file is auto-generated, this would need to be added to the upstream doc comment or as a post-processing step.

Comment on lines +118 to +124
```
audio, _ := os.ReadFile("audio.mp3")
result, err := client.ASR.Transcribe(ctx, audio, &fishaudio.TranscribeParams{
Language: "en",
})
fmt.Println(result.Text)
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Missing go language tag on example code blocks.

The example code blocks at lines 118, 148, 164, and 201 use bare ``` fences without a language identifier. All other code blocks in the file correctly use ```go. This affects syntax highlighting and violates the coding guideline requiring language tags on all code blocks.

Since this is auto-generated by gomarkdoc, the fix would need to happen upstream in the Go SDK doc comments (the tool should emit fenced blocks with the go tag).

Example fix for this block
-```
+```go
 audio, _ := os.ReadFile("audio.mp3")

Also applies to: 148-151, 164-167, 201-216

As per coding guidelines, "Include language tags on all code blocks".

🤖 Prompt for AI Agents
In `@api-reference/sdk/go/api-reference.mdx` around lines 118 - 124, The fenced
code blocks for the Go examples (e.g., the block containing "audio, _ :=
os.ReadFile(...)", "client.ASR.Transcribe", "fishaudio.TranscribeParams", and
other SDK examples) are missing the "go" language tag; update each affected
fenced block to start with ```go instead of ``` to restore proper Go syntax
highlighting. Because these examples are generated by gomarkdoc, fix the
upstream Go doc comments (the example code in the Go SDK source that includes
these snippets) so gomarkdoc emits ```go fences, or if a local quick fix is
required, add the ```go tag directly to the generated
api-reference/sdk/go/api-reference.mdx code fences for each example block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant