Support native playback on Windows (#360)

* Support native playback on Windows

* Use mypy-blessed platform switching logic

* Address feedback

* I think mypy is happy now

* Don't print srt when filename is None

* Fix ctypes imports

* Fix pylint and black complaints

Signed-off-by: rany <rany2@riseup.net>

* Have play_mp3_win32 use a guard clause to reduce nesting

Signed-off-by: rany <rany2@riseup.net>

---------

Signed-off-by: rany <rany2@riseup.net>
Co-authored-by: rany <rany2@riseup.net>
This commit is contained in:
Will
2025-02-27 11:10:43 -08:00
committed by GitHub
parent 152a69e77f
commit ecf50b916e
5 changed files with 108 additions and 25 deletions

View File

@@ -24,7 +24,7 @@ If you wish to play it back immediately with subtitles, you could use the `edge-
$ edge-playback --text "Hello, world!"
Note that `edge-playback` requires the installation of the [`mpv` command line player](https://mpv.io/).
Note that `edge-playback` requires the installation of the [`mpv` command line player](https://mpv.io/), except on Windows.
All `edge-tts` commands work with `edge-playback` with the exception of the `--write-media`, `--write-subtitles` and `--list-voices` options.