-
Notifications
You must be signed in to change notification settings - Fork 6
Update Go SDK API Reference #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Auto-generated from fishaudio/fish-audio-go@7a760d4
📝 WalkthroughWalkthroughThis pull request adds a comprehensive Go SDK API reference documentation file ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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.
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 exampleTTSService.Stream()(line 769): Signature documented but no exampleVoicesService.List()(line 939): Signature documented but no exampleConsider 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
📒 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)
| ``` | ||
| audio, _ := os.ReadFile("audio.mp3") | ||
| result, err := client.ASR.Transcribe(ctx, audio, &fishaudio.TranscribeParams{ | ||
| Language: "en", | ||
| }) | ||
| fmt.Println(result.Text) | ||
| ``` |
There was a problem hiding this comment.
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 -->
Auto-generated API documentation update from fish-audio-go@296bf7655c8fc101fae9009be62c8b3ea468b167
Changes