Ben-Kerman / immersive

Language learning mpv script for looking up words within mpv and generating Anki cards
GNU General Public License v3.0
84 stars 1 forks source link

Immersive "disappears"/freezes when trying to play Forvo audio. #8

Closed sbstratos79 closed 3 years ago

sbstratos79 commented 3 years ago

mpv version : mpvnet 0.32.0-410-g640db1ed3f

Immersive is behaving strangely for me. If I try to listen to the forvo audio, the Immersive ui disappears and it stops responding to hotkeys. I have to restart mpv to get it to work again. Immersive throws an error when mpv is loading "invalid boolean ('<...>'), must be 'yes', 'true', 'no' or 'false' " Sometimes when selecting the target word it shows the error "digit replacement has the wrong length <...>" If I export the cards to Anki, the image and audio is broken. I can open another issue for that if you want.

I have attached the log file for the forvo audio error. log.txt

Ben-Kerman commented 3 years ago

If I try to listen to the forvo audio, the Immersive ui disappears and it stops responding to hotkeys.

If I export the cards to Anki, the image and audio is broken.

Looks like the script can't start new instances of mpv for playing Forvo clips/audio preview and encoding audio and images. Until now the script crashed if the mpv instance for background playback was missing, but I added a check so in future versions it should show an error instead.

I'm not sure why that happens, but if I had to guess it probably has something to do with you using mpv.net instead of regular mpv. I'm not sure how to fix it (other than switching to normal mpv), but try replacing the script with the version from this archive. If that works let me know. If it doesn't, extract the latest build from here somewhere and put the folder that contains mpv.exe and mpv.com in your PATH. If that works I'll add a note to the installation instructions.

Immersive throws an error when mpv is loading "invalid boolean ('<...>'), must be 'yes', 'true', 'no' or 'false' "

Sometimes when selecting the target word it shows the error "digit replacement has the wrong length <...>"

Because you uncommented preload and export:digits in the dictionary config without setting them to a valid value. preload must be one of those words (yes/true/no/false) and export:digits has to be exactly 10 characters long (and mostly exists to replace halfwidth with fullwidth digits, so you probably don't need it anyway). If you're just using JMdict this is all you need in the dict config file as long as you're ok with the default templates:

[JMdict]
location=...
type=yomichan
sbstratos79 commented 3 years ago

Thanks. I fixed the config file. I tried the immersive zip you provided. Now it doesn't crash but throws an error instead "could not connect to background player". So that's good. I uninstalled mpvnet and installed vanilla mpv but that isn't working either. Same error.

I have added mpv folder, mpv.exe and mpv.com files to the environment path. I can access mpv from anywhere in the terminal.

Ben-Kerman commented 3 years ago

I changed the name of the exe it tries to run to mpvnet in the archive from before.

Try this version instead. It's the same but with the regular exe filename instead.

sbstratos79 commented 3 years ago

This one works. Thanks! EDIT: Everything works now. Including the card export.