feat: add MiniMax TTS support#42
Conversation
The OpenAI API accepts speed values from 0.25 to 4.0, which requires a float type. Changed the Speed field to float64 to match the API specification and allow decimal values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the unspeech backend by adding support for MiniMax TTS, offering both streaming and non-streaming capabilities. It includes necessary API endpoints, SDK integration, and a precision fix for the speed parameter, expanding the range of supported TTS providers. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for MiniMax TTS to the unSpeech backend and TypeScript SDK. While it introduces new Go backend files for speech synthesis and voice listing, updates to routing, and a corresponding TypeScript SDK module, two medium-severity issues have been identified: a logic bug in the TypeScript SDK causing permanent mutation of the base URL, and a memory exhaustion vulnerability in the streaming TTS implementation due to buffering the entire response. Additionally, the review highlights opportunities to improve code quality by addressing duplication in request building, enhancing readability by replacing nested ternary operators, using idiomatic Go for error and stream handling, and translating Chinese code comments to English for consistency.
- Translate Chinese comments to English - Extract common functions (buildVoiceSettings, buildAudioSettings, getContentType, handleHTTPError) - Fix TypeScript baseURL side effect using local variable - Replace string() conversion with bytes.NewReader
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
本地测试结果 ✅ 已使用 TypeScript SDK 在本地完成测试验证: 测试环境
测试结果
所有测试通过,SDK 可正常使用。 |
Summary
/api/voices?provider=minimaxcreateUnMinimax()Changes
pkg/backend/minimax/speech.gopkg/backend/minimax/voices.gopkg/backend/backend.gopkg/backend/types/types.gosdk/typescript/src/backend/minimax.tsREADME.mdsdk/typescript/README.mdTest Plan
/api/voices?provider=minimax)