Read selected text aloud with AI voice synthesis.
Select text in any app, press a global shortcut, and listen.
tts-reader folder)Assumption: you already cloned this repo and your terminal is currently inside the project root:
pwd
# .../tts-reader
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
# Clone LongCat repo inside tts-reader (if not present yet)
[ -d LongCat-AudioDiT ] || git clone https://github.com/meituan-longcat/LongCat-AudioDiT.git
# Install dependencies required by LongCat and this app
pip install -r LongCat-AudioDiT/requirements.txt
pip install -r requirements.txt
audiodit import path)PYTHONPATH="$PWD/LongCat-AudioDiT:$PYTHONPATH" python main.py
On first launch, model weights download from Hugging Face (roughly 2-7 GB depending on variant).
If hotkeys or text capture do not work, enable permissions for the app that launched Python:
System Settings -> Privacy & Security -> AccessibilitySystem Settings -> Privacy & Security -> Input MonitoringSystem Settings -> Privacy & Security -> Automation (allow controlling System Events when prompted)If you run from VSCode terminal, grant Visual Studio Code. If you run from Terminal/iTerm, grant Terminal/iTerm.
From the project root:
source .venv/bin/activate
PYTHONPATH="$PWD/LongCat-AudioDiT:$PYTHONPATH" python main.py
Optional (persist path once):
echo 'export PYTHONPATH="/ABSOLUTE/PATH/TO/tts-reader/LongCat-AudioDiT:$PYTHONPATH"' >> ~/.zshrc
source ~/.zshrc
| Action | Shortcut |
|---|---|
| Read selected text / Resume | Option + W |
| Stop / Pause | Option + S |
| Speed up | Option + Up |
| Slow down | Option + Down |
| Next sentence | Option + Right |
| Previous sentence | Option + Left |
Option + W to read.Option + S to pause.Option + W again to resume.You can configure model, voice, speed, and inference from the settings window or by editing config.yaml.
Example:
model:
name: "LongCatAudioDiT"
variant: "1B" # "1B" or "3.5B"
voice:
prompt_file: "" # file inside voices/
playback:
speed: 1.0
speed_step: 0.1
speed_min: 0.5
speed_max: 3.0
shortcuts:
read_selected: "option+w"
stop_reading: "option+s"
read_faster: "option+up"
read_slower: "option+down"
next_sentence: "option+right"
prev_sentence: "option+left"
inference:
steps: 16
cfg_strength: 4.0
guidance_method: "apg" # "apg" or "cfg"
.wav files in voices/.Option + W does nothingOption + Up:
Model not loaded / audiodit import errorRun:
pip install -r LongCat-AudioDiT/requirements.txt
pip install -r requirements.txt
PYTHONPATH="$PWD/LongCat-AudioDiT:$PYTHONPATH" python main.py
Check audio devices:
python -c "import sounddevice as sd; print(sd.query_devices())"
xclip or xsel for selection capture.4 commits
Python
100.0%
Read selected text aloud with AI voice synthesis.
Select text in any app, press a global shortcut, and listen.
tts-reader folder)Assumption: you already cloned this repo and your terminal is currently inside the project root:
pwd
# .../tts-reader
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
# Clone LongCat repo inside tts-reader (if not present yet)
[ -d LongCat-AudioDiT ] || git clone https://github.com/meituan-longcat/LongCat-AudioDiT.git
# Install dependencies required by LongCat and this app
pip install -r LongCat-AudioDiT/requirements.txt
pip install -r requirements.txt
audiodit import path)PYTHONPATH="$PWD/LongCat-AudioDiT:$PYTHONPATH" python main.py
On first launch, model weights download from Hugging Face (roughly 2-7 GB depending on variant).
If hotkeys or text capture do not work, enable permissions for the app that launched Python:
System Settings -> Privacy & Security -> AccessibilitySystem Settings -> Privacy & Security -> Input MonitoringSystem Settings -> Privacy & Security -> Automation (allow controlling System Events when prompted)If you run from VSCode terminal, grant Visual Studio Code. If you run from Terminal/iTerm, grant Terminal/iTerm.
From the project root:
source .venv/bin/activate
PYTHONPATH="$PWD/LongCat-AudioDiT:$PYTHONPATH" python main.py
Optional (persist path once):
echo 'export PYTHONPATH="/ABSOLUTE/PATH/TO/tts-reader/LongCat-AudioDiT:$PYTHONPATH"' >> ~/.zshrc
source ~/.zshrc
| Action | Shortcut |
|---|---|
| Read selected text / Resume | Option + W |
| Stop / Pause | Option + S |
| Speed up | Option + Up |
| Slow down | Option + Down |
| Next sentence | Option + Right |
| Previous sentence | Option + Left |
Option + W to read.Option + S to pause.Option + W again to resume.You can configure model, voice, speed, and inference from the settings window or by editing config.yaml.
Example:
model:
name: "LongCatAudioDiT"
variant: "1B" # "1B" or "3.5B"
voice:
prompt_file: "" # file inside voices/
playback:
speed: 1.0
speed_step: 0.1
speed_min: 0.5
speed_max: 3.0
shortcuts:
read_selected: "option+w"
stop_reading: "option+s"
read_faster: "option+up"
read_slower: "option+down"
next_sentence: "option+right"
prev_sentence: "option+left"
inference:
steps: 16
cfg_strength: 4.0
guidance_method: "apg" # "apg" or "cfg"
.wav files in voices/.Option + W does nothingOption + Up:
Model not loaded / audiodit import errorRun:
pip install -r LongCat-AudioDiT/requirements.txt
pip install -r requirements.txt
PYTHONPATH="$PWD/LongCat-AudioDiT:$PYTHONPATH" python main.py
Check audio devices:
python -c "import sounddevice as sd; print(sd.query_devices())"
xclip or xsel for selection capture.4 commits
Python
100.0%