{"id":44112318,"url":"https://github.com/chicogong/flow-tts","last_synced_at":"2026-02-08T16:34:14.230Z","repository":{"id":330134923,"uuid":"1120430724","full_name":"chicogong/flow-tts","owner":"chicogong","description":"OpenAI-style TTS SDK for Tencent Cloud - simple, elegant, multi-language","archived":false,"fork":false,"pushed_at":"2025-12-30T19:06:10.000Z","size":157,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-03T16:48:34.450Z","etag":null,"topics":["golang","java","nodejs","openai","openai-compatible","python","sdk","streaming","tencent-cloud","text-to-speech","tts","typescript","voice-synthesis"],"latest_commit_sha":null,"homepage":"https://huggingface.co/spaces/gonghaoran/flow-tts","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chicogong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T07:37:10.000Z","updated_at":"2025-12-24T11:37:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chicogong/flow-tts","commit_stats":null,"previous_names":["chicogong/flow-tts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chicogong/flow-tts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicogong%2Fflow-tts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicogong%2Fflow-tts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicogong%2Fflow-tts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicogong%2Fflow-tts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chicogong","download_url":"https://codeload.github.com/chicogong/flow-tts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicogong%2Fflow-tts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29236900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","java","nodejs","openai","openai-compatible","python","sdk","streaming","tencent-cloud","text-to-speech","tts","typescript","voice-synthesis"],"created_at":"2026-02-08T16:34:13.760Z","updated_at":"2026-02-08T16:34:14.219Z","avatar_url":"https://github.com/chicogong.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlowTTS\n\n[![Node.js CI](https://github.com/chicogong/flow-tts/actions/workflows/node-ci.yml/badge.svg)](https://github.com/chicogong/flow-tts/actions/workflows/node-ci.yml)\n[![Python CI](https://github.com/chicogong/flow-tts/actions/workflows/python-ci.yml/badge.svg)](https://github.com/chicogong/flow-tts/actions/workflows/python-ci.yml)\n[![Go CI](https://github.com/chicogong/flow-tts/actions/workflows/go-ci.yml/badge.svg)](https://github.com/chicogong/flow-tts/actions/workflows/go-ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003e OpenAI-style TTS SDK for Tencent Cloud - Simple, elegant, multi-language\n\nEnglish | [简体中文](./README_CN.md)\n\nFlowTTS is a lightweight Text-to-Speech SDK that wraps Tencent Cloud's TRTC TTS API with an OpenAI-compatible interface. Available in **Node.js**, **Python**, **Go**, and **Java**.\n\n## 🎮 Try it Now\n\nExperience FlowTTS instantly without any setup:\n\n| Platform | Link | Description |\n|----------|------|-------------|\n| Hugging Face | [gonghaoran/flow-tts](https://huggingface.co/spaces/gonghaoran/flow-tts) | Free Gradio demo |\n| Streamlit | [flowtts.streamlit.app](https://flowtts.streamlit.app) | Interactive demo |\n| Replicate | [chicogong/flow-tts](https://replicate.com/chicogong/flow-tts) | API + Playground |\n\n\u003e **BYOK (Bring Your Own Key)**: You need your own Tencent Cloud credentials to use these demos.\n\u003e See [flowtts-byok](https://github.com/chicogong/flowtts-byok) for deployment guides.\n\n## ✨ Features\n\n- 🎯 **OpenAI-Compatible API** - Drop-in replacement for OpenAI TTS\n- 🌍 **Multi-Language SDKs** - Node.js, Python, and Go implementations\n- ⚡ **Zero Dependencies** - Uses only built-in libraries\n- 🔷 **Type-Safe** - Full TypeScript, Python type hints, and Go static typing\n- 🌊 **Streaming Support** - Real-time audio streaming\n- 🎤 **Rich Voice Library** - 380+ preset voices in multiple languages\n- 🔍 **Auto Language Detection** - Automatically detects text language\n\n## 📦 Installation\n\n### Node.js\n\n```bash\nnpm install flow-tts\n```\n\n### Python\n\n```bash\npip install flow-tts\n```\n\n### Go\n\n```bash\ngo get github.com/chicogong/flow-tts/go\n```\n\n## 🚀 Quick Start\n\n### Node.js\n\n```typescript\nimport { FlowTTS } from 'flow-tts';\n\nconst client = new FlowTTS({\n  secretId: process.env.TX_SECRET_ID!,\n  secretKey: process.env.TX_SECRET_KEY!,\n  sdkAppId: parseInt(process.env.TRTC_SDK_APP_ID!)\n});\n\n// OpenAI-compatible API\nconst response = await client.audio.speech.create({\n  text: 'Hello, world!',\n  voice: 'v-female-R2s4N9qJ'\n});\n\nawait fs.writeFile('output.wav', response.audio);\n```\n\n### Python\n\n```python\nfrom flow_tts import FlowTTS\n\nclient = FlowTTS({\n    \"secret_id\": \"your-secret-id\",\n    \"secret_key\": \"your-secret-key\",\n    \"sdk_app_id\": 1400000000\n})\n\n# Synthesize speech\nresponse = client.synthesize({\n    \"text\": \"你好，世界！\",\n    \"voice\": \"v-female-R2s4N9qJ\",\n    \"format\": \"wav\"\n})\n\n# Save to file\nwith open(\"output.wav\", \"wb\") as f:\n    f.write(response[\"audio\"])\n```\n\n### Go\n\n```go\npackage main\n\nimport (\n    \"os\"\n    flowtts \"github.com/chicogong/flow-tts/go\"\n)\n\nfunc main() {\n    client, _ := flowtts.NewClient(flowtts.Config{\n        SecretID:  os.Getenv(\"TX_SECRET_ID\"),\n        SecretKey: os.Getenv(\"TX_SECRET_KEY\"),\n        SdkAppID:  1400000000,\n    })\n\n    response, _ := client.Synthesize(flowtts.SynthesizeOptions{\n        Text:   \"你好，世界！\",\n        Voice:  \"v-female-R2s4N9qJ\",\n        Format: flowtts.AudioFormatWAV,\n    })\n\n    os.WriteFile(\"output.wav\", response.Audio, 0644)\n}\n```\n\n## 📚 Documentation\n\n- [Node.js SDK Documentation](./packages/node/README.md)\n- [Python SDK Documentation](./packages/python/README.md)\n- [Go SDK Documentation](./packages/go/README.md)\n\n## 🎤 Voice Library\n\nThe SDK provides **380+ preset voices**:\n- 77 Turbo voices (low latency)\n- 303 Extended voices (high quality)\n\n### Recommended Voices\n\n| Voice ID | Name | Language | Features |\n|---------|------|---------|----------|\n| `v-female-R2s4N9qJ` | 温柔姐姐 | Chinese | Gentle, Warm |\n| `v-male-Bk7vD3xP` | 威严霸总 | Chinese | Mature, Steady |\n| `v-female-p9Xy7Q1L` | 清晰女旁白 | English | Clear, Professional |\n\n## 🌊 Streaming Support\n\nAll SDKs support real-time streaming:\n\n**Node.js:**\n```typescript\nfor await (const chunk of client.synthesizeStream({ text: '...' })) {\n  if (chunk.type === 'audio') {\n    console.log(`Received ${chunk.data.length} bytes`);\n  }\n}\n```\n\n**Python:**\n```python\nfor chunk in client.synthesize_stream({\"text\": \"...\"}):\n    if chunk[\"type\"] == \"audio\":\n        print(f\"Received {len(chunk['data'])} bytes\")\n```\n\n**Go:**\n```go\nchunkChan, _ := client.SynthesizeStream(flowtts.SynthesizeOptions{Text: \"...\"})\nfor chunk := range chunkChan {\n    if chunk.Type == \"audio\" {\n        fmt.Printf(\"Received %d bytes\\n\", len(chunk.Data))\n    }\n}\n```\n\n## ⚙️ Configuration\n\nAll SDKs require the same credentials:\n\n```bash\nTX_SECRET_ID=your-tencent-cloud-secret-id\nTX_SECRET_KEY=your-tencent-cloud-secret-key\nTRTC_SDK_APP_ID=your-trtc-app-id\n```\n\n## 🔧 Development\n\n```bash\n# Install dependencies (Node.js)\npnpm install\n\n# Build Node.js SDK\npnpm --filter flow-tts build\n\n# Test Python SDK\ncd packages/python \u0026\u0026 pytest\n\n# Test Go SDK\ncd packages/go \u0026\u0026 go test ./...\n```\n\n## 📊 SDK Comparison\n\n| Feature | Node.js | Python | Go |\n|---------|---------|--------|-----|\n| Zero Dependencies | ✅ | ✅ | ✅ |\n| Type Safety | TypeScript | Type Hints | Static Types |\n| Streaming | ✅ | ✅ | ✅ |\n| Voice Library | 380+ | 380+ | 380+ |\n| OpenAI Compatible | ✅ | ✅ | ✅ |\n| Package Manager | npm | PyPI | go get |\n\n## 📄 License\n\nMIT License - see [LICENSE](./LICENSE) file\n\n## 🤝 Contributing\n\nIssues and Pull Requests are welcome!\n\n## 📮 Links\n\n- **Live Demo**: [Hugging Face Space](https://huggingface.co/spaces/gonghaoran/flow-tts)\n- **BYOK Guide**: [flowtts-byok](https://github.com/chicogong/flowtts-byok)\n- **GitHub**: [chicogong/flow-tts](https://github.com/chicogong/flow-tts)\n- **npm**: [flow-tts](https://www.npmjs.com/package/flow-tts)\n- **PyPI**: [flow-tts](https://pypi.org/project/flow-tts/)\n- **Go Package**: [github.com/chicogong/flow-tts/go](https://pkg.go.dev/github.com/chicogong/flow-tts/go)\n\n## 🙏 Acknowledgments\n\nBuilt on top of Tencent Cloud TRTC TTS API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchicogong%2Fflow-tts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchicogong%2Fflow-tts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchicogong%2Fflow-tts/lists"}