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

Make edge-playback more instantaneous for large text

Open rany2 opened this issue 1 year ago • 8 comments

This was done in the past however when subtitles were added this stopped being possible as easily.

Split text into chunks for subtitles to work properly for edge-playback and to provide instantaneous playback.

rany2 avatar Jun 18 '23 15:06 rany2

Why? Because I want to integrate it with https://github.com/wustho/epy but I don't want to wait for ages for the playback.

rany2 avatar Jun 18 '23 15:06 rany2

Yes absolutely. Couldn't you have it read everything live so that you don't need any temporary files at all?

KonerDev avatar Aug 03 '23 05:08 KonerDev

I've done that before but had to stop doing that so the subtitle generation works.

rany2 avatar Aug 03 '23 11:08 rany2

Can you maybe make it optional?

KonerDev avatar Aug 04 '23 09:08 KonerDev

FWIW edge-tts -t "text here" | mpv - starts playing audio instantaneously independent of text size.

CheerfulPianissimo avatar Nov 07 '23 14:11 CheerfulPianissimo

@CheerfulPianissimo that's how the edge-playback command used to work before adding subtitles support :)

rany2 avatar Nov 09 '23 09:11 rany2

Why? Because I want to integrate it with https://github.com/wustho/epy but I don't want to wait for ages for the playback.

any progress? i get "TimeoutError" and partial audio (1-9 min at random)

nazdridoy avatar May 07 '24 23:05 nazdridoy

Why? Because I want to integrate it with https://github.com/wustho/epy but I don't want to wait for ages for the playback.

any progress? i get "TimeoutError" and partial audio (1-9 min at random)

If you're on Linux/Mac, you could do edge-tts --text "$@" 2>/dev/null | mpv - (or Windows equivalent); it will do it immediately. Unfortunately, the partial audio is this issue: https://github.com/rany2/edge-tts/issues/190

rany2 avatar May 09 '24 13:05 rany2