Skip to content
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

edge-playback opens the MPV GUI on Windows #315

Open
ichat006 opened this issue Nov 22, 2024 · 7 comments
Open

edge-playback opens the MPV GUI on Windows #315

ichat006 opened this issue Nov 22, 2024 · 7 comments

Comments

@ichat006
Copy link

I am using Windows 10 LTSC. When I execute the command edge-playback --text "Hello, world!", the generated audio plays in the MPV window.

  1. For MP3 files, the pop-up window seems unnecessary and even interferes with foreground work. It would be more appropriate to play MP3 files in the background.
  2. When executing the above command, a *.vtt file for the audio is automatically generated. How can I suppress the generation of this file? I believe that avoiding its creation would make the command execute faster since I only want to hear the audio.

See Gif demo:
A

@rany2
Copy link
Owner

rany2 commented Nov 22, 2024

2. How can I suppress the generation of this file? I believe that avoiding its creation would make the command execute faster since I only want to hear the audio.

It doesn't even take a millisecond to generate, so it's not really an issue.

For MP3 files, the pop-up window seems unnecessary and even interferes with foreground work. It would be more appropriate to play MP3 files in the background.

This is only an issue on Windows and I'm not exactly sure what arguments need to be added to mpv to make this behavior stop. Can you try to add --no-audio-display as suggested by mpv-player/mpv#4426 (comment) to the arguments for mpv? You need to do this by adding it to the list of arguments to mpv here:

f"--sub-file={vtt_fname}",

@ichat006
Copy link
Author

  1. How can I suppress the generation of this file? I believe that avoiding its creation would make the command execute faster since I only want to hear the audio.

It doesn't even take a millisecond to generate, so it's not really an issue.

For MP3 files, the pop-up window seems unnecessary and even interferes with foreground work. It would be more appropriate to play MP3 files in the background.

This is only an issue on Windows and I'm not exactly sure what arguments need to be added to mpv to make this behavior stop. Can you try to add --no-audio-display as suggested by mpv-player/mpv#4426 (comment) to the arguments for mpv? You need to do this by adding it to the list of arguments to mpv here:

f"--sub-file={vtt_fname}",

Thank you for your reply.
I’m not sure what’s going on, but the TTS service often becomes unavailable, and the generated MP3 files cannot be played. I suspect Microsoft might have implemented regional restrictions. I’m from China. Currently, the TTS service is unavailable, so I’m unable to test whether the playback parameters are effective. I will test them once the TTS service is working again.

@ichat006
Copy link
Author

  1. How can I suppress the generation of this file? I believe that avoiding its creation would make the command execute faster since I only want to hear the audio.

It doesn't even take a millisecond to generate, so it's not really an issue.

For MP3 files, the pop-up window seems unnecessary and even interferes with foreground work. It would be more appropriate to play MP3 files in the background.

This is only an issue on Windows and I'm not exactly sure what arguments need to be added to mpv to make this behavior stop. Can you try to add --no-audio-display as suggested by mpv-player/mpv#4426 (comment) to the arguments for mpv? You need to do this by adding it to the list of arguments to mpv here:

f"--sub-file={vtt_fname}",

I modified the parameters as shown below, but it had no effect; the GUI window still appears:
f"--sub-file={vtt_fname} --no-audio-display",

@rany2
Copy link
Owner

rany2 commented Nov 22, 2024

I modified the parameters as shown below, but it had no effect; the GUI window still appears:
f"--sub-file={vtt_fname} --no-audio-display",

It's supposed to be: f"--sub-file={vtt_fname}", "--no-audio-display",

@rany2
Copy link
Owner

rany2 commented Nov 22, 2024

Actually revisiting this, it could be an MPV bug on Windows only :/

See mpv-player/mpv#4426 (comment)

@rany2 rany2 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
@ichat006
Copy link
Author

ichat006 commented Nov 23, 2024

Actually revisiting this, it could be an MPV bug on Windows only :/

See mpv-player/mpv#4426 (comment)

I made a new attempt and directly used the following command to play the MP3 file, but the MPV GUI interface did not appear.

mpv hello.mp3

The playback details are not displayed with the command:

mpv hello.mp3 --no-terminal

A

@ichat006
Copy link
Author

Actually revisiting this, it could be an MPV bug on Windows only :/

See mpv-player/mpv#4426 (comment)

Could you review this issue again? There is no problem with displaying the GUI window on Windows. Directly using the above MPV command line does not display a GUI window.

@rany2 rany2 changed the title Using the edge-playback command opens an MPV window. edge-playback opens the MPV GUI on Windows Nov 24, 2024
@rany2 rany2 reopened this Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants