Open-Source macOS Audio Studio for Qwen-Audio TTS Built with Gemini 3.8 Flash
The author details the development of an open-source macOS native application for Alibaba's Qwen-Audio-3.1-TTS-Next model, featuring an AI scriptwriter, native creation studio with voice parameter controls, instant playback, project library with A/B testing, and 42 templates, all built using SwiftUI and Gemini 3.8 Flash.
Project Overview
The author (Lao Zhang) previously built a web-based audio generation studio for Alibaba's Qwen-Audio-3.1-TTS-Next model. Users found the web version cumbersome and API scripting too complex. Using Gemini 3.8 Flash as the primary coding assistant, the author rebuilt the tool as a native macOS client with SwiftUI and AppKit, adding extensive features. The entire codebase and a ready-to-install DMG are open source.
Core Architecture
Zero external dependencies : No local Python, Node.js, or ffmpeg required.
Local SQLite database for instant storage and retrieval of projects, prompts, and generated audio.
Native macOS integration : CoreAudio for playback, Finder reveal for generated files, native sliders and shortcuts.
API compatibility : The AI scriptwriter backend accepts any OpenAI-compatible API endpoint.
Feature 1: AI Scriptwriter (AI 编剧)
Converts rough ideas into structured, industrial-grade surround-sound scripts. Preloaded scenarios include:
Dual-host tech podcast
15-second product ad
Suspense radio drama
Fantasy tavern voiceover
Given a prompt like "write a 15-second coffee ad with door chime and steam wand sounds", the scriptwriter outputs a script with four sections: [任务] (Task) [声场与环境] (Soundscape & Environment) [音效时间轴] (SFX Timeline) [人物与台词] (Characters & Dialogue)
One click inserts the parsed script into the main creation studio.
Feature 2: Native Creation Studio (原生创作台)
Full macOS-native editing environment:
Quick-tag toolbar : Insert [角色], [对白], [时间戳], [音效], [音乐], [音色] tags; adjustable editor font size.
Acoustic parameters : Output format (WAV, MP3, PCM), sample rate (16000, 24000, 48000 Hz), speech rate and volume via native sliders.
Reference voice support : Upload local audio, trim to ≤30 s waveform segment, use ad-hoc or save permanently to local voice library.
Before generation, a semi-transparent preflight window shows the complete compiled prompt, output directory, reference voice file, and estimated billing count. The request fires only after explicit user confirmation.
Feature 3: Instant Playback & Delivery (即刻试听与交付)
Four-stage visual progress monitor:
参数编译准备 → 提交百炼任务 → 异步声学渲染 → 结果下载与入库On completion, a delivery card appears with two macOS-specific optimizations:
Direct playback : Native play/pause button streams via CoreAudio, handles Bailian OSS streaming WAV dynamic headers, displays exact physical duration (e.g., 15.0 s).
Finder reveal : One click highlights the actual generated file in Finder for immediate drag-and-drop into Final Cut, WeChat, etc.
Feature 4: Project Library & A/B Blind Testing (作品库与同位置 A/B 盲测)
Every generation — audio, prompt, parameter set — is silently persisted in the local SQLite database. The library supports keyword search, tag filtering, and waveform thumbnails. Inside a project, same-position A/B blind testing lets the user switch between version A and B at the exact same playback timestamp to compare speech naturalness, background music blend, etc.
Feature 5: 42 Ready-to-Use Templates (42 套开箱即用的灵感模板)
Seven scenario categories (Podcast, Ad, Audiobook, Radio Drama, Game Dubbing, Narration, Custom), each with 6 battle-tested templates (42 total). Templates pre-configure character voice settings, soundscape, and SFX trigger points; users only replace theme variables.
Open Source & Future Plans
The project is fully open source. The author invites stars, issues, and pull requests, and plans to add support for more TTS models beyond Qwen-Audio.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Old Zhang's AI Learning
AI practitioner specializing in large-model evaluation and on-premise deployment, agents, AI programming, Vibe Coding, general AI, and broader tech trends, with daily original technical articles.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
