ai-say
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Say
AI Say
Local text-to-speech via . Kokoro-first with flite and
speech-dispatcher fallbacks. Requires the voice stack to be installed first.
~/.local/bin/ai-say本地文本转语音功能通过实现。优先使用Kokoro TTS,同时支持flite和speech-dispatcher作为回退方案。使用前需先安装语音栈。
~/.local/bin/ai-sayPrerequisites
前置要求
The voice stack must be installed before using this skill:
bash
git clone https://github.com/Ema93sh/ai-voice-stack.git
cd ai-voice-stack
scripts/voice-up-setup.sh --with-system-depsThis installs to and sets up Kokoro TTS.
ai-say~/.local/bin/使用本技能前必须先安装语音栈:
bash
git clone https://github.com/Ema93sh/ai-voice-stack.git
cd ai-voice-stack
scripts/voice-up-setup.sh --with-system-deps此操作会将安装到并配置Kokoro TTS。
ai-say~/.local/bin/Usage
使用方法
Speak text:
bash
~/.local/bin/ai-say "Hello world"Pipe text:
bash
echo "Read this aloud" | ~/.local/bin/ai-sayTemporary voice override:
bash
AI_KOKORO_VOICE=am_michael ~/.local/bin/ai-say "Different voice"朗读文本:
bash
~/.local/bin/ai-say "Hello world"管道输入文本:
bash
echo "Read this aloud" | ~/.local/bin/ai-say临时切换语音:
bash
AI_KOKORO_VOICE=am_michael ~/.local/bin/ai-say "Different voice"Available Voices
可用语音
English (American)
美式英语
Female: , , , (default), ,
, , , , ,
af_alloyaf_aoedeaf_bellaaf_heartaf_jessicaaf_koreaf_nicoleaf_novaaf_riveraf_sarahaf_skyMale: , , , , ,
, , ,
am_adamam_echoam_ericam_fenriram_liamam_michaelam_onyxam_puckam_santa女声: , , , (默认), ,
, , , , ,
af_alloyaf_aoedeaf_bellaaf_heartaf_jessicaaf_koreaf_nicoleaf_novaaf_riveraf_sarahaf_sky男声: , , , , ,
, , ,
am_adamam_echoam_ericam_fenriram_liamam_michaelam_onyxam_puckam_santaEnglish (British)
英式英语
Female: , , ,
bf_alicebf_emmabf_isabellabf_lilyMale: , , ,
bm_danielbm_fablebm_georgebm_lewis女声: , , ,
bf_alicebf_emmabf_isabellabf_lily男声: , , ,
bm_danielbm_fablebm_georgebm_lewisOther Languages
其他语言
Spanish (, ), French (), Hindi (,
, , ), Italian (, ),
Japanese (, , , , ),
Portuguese (, ), Chinese (, ,
, , , , , )
ef_doraem_alexff_siwishf_alphahf_betahm_omegahm_psiif_saraim_nicolajf_alphajf_gongitsunejf_nezumijf_tebukurojm_kumopf_dorapm_alexzf_xiaobeizf_xiaonizf_xiaoxiaozf_xiaoyizm_yunjianzm_yunxizm_yunxiazm_yunyang西班牙语(, )、法语()、印地语(,
, , )、意大利语(, )、
日语(, , , , )、
葡萄牙语(, )、中文(, ,
, , , , , )
ef_doraem_alexff_siwishf_alphahf_betahm_omegahm_psiif_saraim_nicolajf_alphajf_gongitsunejf_nezumijf_tebukurojm_kumopf_dorapm_alexzf_xiaobeizf_xiaonizf_xiaoxiaozf_xiaoyizm_yunjianzm_yunxizm_yunxiazm_yunyangPersistent Voice Change
永久切换语音
Edit :
~/.config/ai-audio.envbash
export AI_KOKORO_VOICE="${AI_KOKORO_VOICE:-af_bella}"编辑文件:
~/.config/ai-audio.envbash
export AI_KOKORO_VOICE="${AI_KOKORO_VOICE:-af_bella}"Volume / Gain
音量 / 增益
If speech is too quiet:
bash
export AI_KOKORO_GAIN_DB=18
~/.local/bin/ai-say "Volume test"如果语音音量太小:
bash
export AI_KOKORO_GAIN_DB=18
~/.local/bin/ai-say "Volume test"Diagnostics
诊断工具
Check stack health:
bash
~/.local/bin/voice-statusCheck audio devices:
bash
pactl list short sinks
pactl list short sources
cat ~/.config/ai-audio.envTest direct tone on a specific sink:
bash
ffmpeg -hide_banner -loglevel error -f lavfi -i 'sine=frequency=880:duration=3' -f wav - | paplay --device='<sink-name>'检查语音栈健康状态:
bash
~/.local/bin/voice-status检查音频设备:
bash
pactl list short sinks
pactl list short sources
cat ~/.config/ai-audio.env在指定输出设备上测试直接音调:
bash
ffmpeg -hide_banner -loglevel error -f lavfi -i 'sine=frequency=880:duration=3' -f wav - | paplay --device='<sink-name>'Subcommands
子命令
Install
安装
Run the full voice stack installer. Finds the repo automatically or clones it:
bash
bash scripts/install.sh --with-system-deps运行完整的语音栈安装程序。会自动查找仓库或进行克隆:
bash
bash scripts/install.sh --with-system-depsDoctor
诊断
Check installation health — reports PASS/FAIL for every component:
bash
bash scripts/doctor.sh检查安装健康状态——会报告每个组件的通过/失败状态:
bash
bash scripts/doctor.shNotes
注意事项
- is Kokoro-first, with flite and spd-say fallback paths.
ai-say - Text is truncated at 1600 chars and chunked at 320 chars for reliable playback.
- Keep messages respectful and follow user intent exactly for spoken content.
- 优先使用Kokoro TTS,同时支持flite和spd-say作为回退方案。
ai-say - 文本会被截断为1600字符,并按320字符分段以保证可靠播放。
- 朗读内容需保持得体,并严格遵循用户的需求。