Skip to content

llama-tts : input from stdin #12890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcoStocchi
Copy link
Contributor

In case of missing text prompt, tts tries to detect an input redirection to the stdin and reads it.
This enables piping text to llama-tts, input redirection and heredocuments.
In case of empty text prompt the program exits, avoiding useless runtime.

* tts.cpp : in case of missing text prompt, tts tries to detect an input redirection to the stdin and reads it. This enables piping text to llama-tts, input redirection and heredocuments. In case of empty text prompt the program exits with EINVAL.
@ngxson
Copy link
Collaborator

ngxson commented Apr 11, 2025

Personally I don't quite like this feature, because you can easily redirect the output from another command to llama-tts by placing the input into an arg, for example:

llama-tts -p "$(cat my_text.txt)"

# this also works with multiple lines input

Beside, the llama-tts-* examples are experimental, I prefer keep them simple by not having too many non-related features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants