aliyun/alibabacloud-bailian-speech-demo
Sample Repository for the AlibabaCloud Bailian Speech SDK
What is this project?
This is a collection of sample code from Alibaba Cloud that shows developers how to use their Bailian speech AI models (speech recognition, speech synthesis, real-time voice chat, music generation, etc.). It’s a practical starting point for building voice-enabled applications.
What does it demonstrate?
The examples cover a wide range of voice AI tasks:
- Speech-to-text (ASR) – real-time streaming, one-shot recognition, and transcription of long recordings (up to 12 hours).
- Text-to-speech (TTS) – voice synthesis with control over style, dialect, emotion, and even voice cloning from a short audio sample.
- Real-time voice conversation – end-to-end voice chat using WebSocket, including companion-style dialogue, function calling, and reasoning.
- Music generation – create songs from a prompt or custom lyrics.
- Advanced integrations – combine speech models with large language models (LLMs) for video/voice chat, translation, summarization, and Q&A.
Who is it for?
Developers who want to quickly integrate Alibaba Cloud’s speech AI into their own projects. The README mentions that free quotas are available for testing, and the code can be directly reused or extended.
What’s included?
- Sample code in Python and Java (and some JavaScript) for each scenario.
- A gallery of community-built projects that use these models (e.g., a real-time multimodal chat client).
- Documentation for prerequisites, common issues, and high-concurrency usage.
How to get started?
- Clone or download the repository.
- Set up an Alibaba Cloud account, enable the Bailian service, create an API key, and install the DashScope SDK (steps are in
PREREQUISITES.md). - Pick an example and run it.
Key models used
- Qwen-Audio-3.1 (TTS, ASR, Realtime) – the latest speech models.
- CosyVoice and Fun-ASR – earlier models also supported.
- Fun-Music – for music generation.
License
MIT License.
Related
- Project
- Project
- Project
- Project
- Project