From e7d067791007f3e445be792949a30cb7ebb07f0c Mon Sep 17 00:00:00 2001 From: uohlhv Date: Thu, 25 Jul 2024 15:54:36 +0800 Subject: [PATCH] Update README --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 731a4c8..fd2077f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ - Linux +## Requirements + +- node +- ffplay + ## Installation ``` @@ -11,9 +16,12 @@ npm i -g git+https://git.yanknil.com/uohlhv/lingva-tts.git ## Usage ``` -# Speak the word `apple` -lingva-tts --lang en --query apple | aplay -q -r 48000 +# Speak `This is an apple.` +lingva-tts --lang en --query "This is an apple." | ffplay -f s16le -ar 48k -ac 1 -autoexit -nodisp - -# Speak the content from selection (require xsel) -xsel | lingva-tts --lang en --stdin | aplay -q -r 48000 +# Speak `This is an apple.` (Speed up the speak tempo by 2x) +lingva-tts --lang en --query "This is an apple." | ffplay -f s16le -ar 48k -ac 1 -af "atempo=2" -autoexit -nodisp - + +# Speak text from cursor selection (Require xsel, and slow down the speak tempo by 0.5x) +xsel | lingva-tts --lang en --stdin | ffplay -f s16le -ar 48k -ac 1 -af "atempo=0.5" -autoexit -nodisp - ```