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@296bf7655c8fc101fae9009be62c8b3ea468b167

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

📝 Walkthrough

Walkthrough

This pull request adds a comprehensive Go SDK API reference documentation file (api-reference/sdk/go/api-reference.mdx) that documents types, services, methods, error handling, and usage patterns for the Go SDK.

Changes

Cohort / File(s) Summary
Go SDK Documentation
api-reference/sdk/go/api-reference.mdx
New comprehensive API reference documenting global defaults, error types, core data structures, service interfaces, streaming primitives, configuration types, text-to-speech features, and builder-style client patterns with inline code examples.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • twangodev

Poem

📚✨ A Go reference, clear and bright,
With types and methods all in sight,
The SDK's secrets now laid bare,
For developers beyond compare,
Hopping through docs with pure delight! 🐰

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update Go SDK API Reference' accurately describes the main change: adding/updating comprehensive Go SDK API reference documentation.
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.
✨ 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)

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.

🛠️ Refactor suggestion | 🟠 Major

Add language tags to all code example blocks.

Example code blocks lack the ```go language tag. Per documentation guidelines, all code blocks must include language tags for proper syntax highlighting and reader clarity.

Examples affected:

  • Line 118–124: Transcribe example
  • Line 148–151: GetCredits example
  • Line 162–167: GetPackage example
  • Line 199–216: AudioStream iteration example
🔎 Example fix for line 118–124
 Example:

-```
+```go
 audio, _ := os.ReadFile("audio.mp3")
 result, err := client.ASR.Transcribe(ctx, audio, &fishaudio.TranscribeParams{
     Language: "en",
 })
 fmt.Println(result.Text)

Apply the same change (add `go` to the opening `` ``` ``) for the other affected blocks.
</details>




Also applies to: 148-151, 162-167, 199-216

<details>
<summary>🤖 Prompt for AI Agents</summary>

In api-reference/sdk/go/api-reference.mdx around lines 118–124, 148–151, 162–167
and 199–216 the fenced code blocks are missing the language tag; update each
opening togo so all examples (Transcribe, GetCredits, GetPackage,
AudioStream iteration) include the go language identifier for proper syntax
highlighting, preserving the existing code content and indentation.


</details>

<!-- fingerprinting:phantom:triton:mongoose -->

<!-- This is an auto-generated comment by CodeRabbit -->

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.

2 participants