A TTS that fits in your CPU (and pocket)
Python
Adding possibility to read the input text from stdin in the CLI (#110)
Mukul bisht431878c0db90
diff --git a/pocket_tts/main.py b/pocket_tts/main.pyindex f749b4b..0c03591 100644--- a/pocket_tts/main.py+++ b/pocket_tts/main.py@@ -1,6 +1,7 @@import ioimport loggingimport os+import sysimport tempfileimport threadingfrom pathlib import Path@@ -243,6 +244,13 @@ def generate(log_level = logging.ERROR if quiet else logging.INFOwith enable_logging("pocket_tts", log_level):+ if text == "-":+ # Read text from stdin+ text = sys.stdin.read()++ if not text.strip():+ logger.error("No input received from stdin.")+ raise typer.Exit(code=1)tts_model = TTSModel.load_model(config, temperature, lsd_decode_steps, noise_clamp, eos_threshold)