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

Problem with sound. #45

Open
tapochek666 opened this issue Aug 25, 2024 · 1 comment
Open

Problem with sound. #45

tapochek666 opened this issue Aug 25, 2024 · 1 comment

Comments

@tapochek666
Copy link

My script
`from win11toast import toast

toast('Привет!', 'Pomidor666 , добро пожаловать!', audio=r"C:\Users\unknown\Downloads\Music\notif.wav" , app_id='Система' , icon= 'C:\Users\unknown\Pictures\666.png')`
Toast notifications appear, everything is fine, but the sound overlaps itself (duplicates) and as a result it seems like the sound has some kind of echo.

@nickstuer
Copy link

nickstuer commented Dec 24, 2024

The issue is related to lines 346/347 in win11toast.py

if audio and isinstance(audio, str) and not audio.startswith('ms'):
        futures.append(loop.create_task(play_sound(audio)))

Comment these two lines out and the duplication goes away. The 'notify' function also adds audio when the audio is a file string so it's added twice.

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