edge-tts icon indicating copy to clipboard operation
edge-tts copied to clipboard

Add "-" as a valid parameter for input/output parameters

Open j824h opened this issue 1 year ago • 5 comments

Reading from the standard input like many other command line tools could be helpful.

Especially, with edge-playback it would allow a streamlined workflow completely free of intermediate files.

j824h avatar Apr 21 '24 13:04 j824h

edge-tts already supports this, it's only edge-playback that has this limitation. What you could do is the following:

<some program> | edge-tts --file /dev/stdin 2>/dev/null | mpv -

rany2 avatar Apr 21 '24 13:04 rany2

That makes sense. I see /dev/stdin is a file of course.

Still you wouldn't plan to alias with - as mpv does?

j824h avatar Apr 22 '24 06:04 j824h

/dev/stdin is actually an alias for stdin, it's handled in edge-tts so it works even if that file doesn't exist (i.e., this works on Windows too)

rany2 avatar Apr 22 '24 07:04 rany2

I see /dev/stdin is actually an alias that works even for Windows. I suppose you want to keep it as the only and correct way?

j824h avatar Apr 22 '24 08:04 j824h

To be honest, I think it's quite confusing. I'll update it and add - as a supported parameter. You would never guess this if you didn't check the code.

rany2 avatar Apr 22 '24 10:04 rany2