Aqt.sound.av_player.insert_file not playing on Mac

I’ve had a bug report from a HyperTTS user on Mac that when doing aqt.sound.av_player.insert_file, they don’t hear sound. They do hear sound when reviewing their Anki deck with sound that was generated using HyperTTS, they just don’t hear any sound when clicking preview, which calls aqt.sound.av_player.insert_file on the main thread. Is there any debugging I can do ?

1 Like

I tried Anki’s built-in file-based implementation that uses insert_file, and it seems to work fine on a Mac here:

diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py
index acf531efb..2b9b2c6ad 100644
--- a/qt/aqt/sound.py
+++ b/qt/aqt/sound.py
@@ -920,9 +920,9 @@ def setup_audio(taskman: TaskManager, base_folder: str, media_folder: str) -> No
 
     # tts support
     if is_mac:
-        from aqt.tts import MacTTSPlayer
+        from aqt.tts import MacTTSFilePlayer
 
-        av_player.players.append(MacTTSPlayer(taskman))
+        av_player.players.append(MacTTSFilePlayer(taskman))
     elif is_win:
         from aqt.tts import WindowsTTSPlayer
 

Maybe terminal output might reveal something?

1 Like

@dae Thank you, i’ve asked the user to look at the terminal and get back to me.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.