Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

I tried to import playsound and play an audio file but its showing and error

JeromandJaison
JeromandJaison

The code I put was

import playsound playsound ("audio.wav")

but its telling that there is no module name gi. Is there a way to solve this?

2 years ago

Voters

Comments

TopNew
2
RYANTADIPARTHI
RYANTADIPARTHI

Solution

playsound doesn't work in repl.it. The only sound system is repl audio. Here's a tutorial on how to use it.

https://docs.repl.it/repls/audio

2 years ago
1
19wintersp
19wintersp

If you're running this on your local computer, gi seems to be a separate library which needs installing. If you're trying to run this on Replit, audio does not currently work as it normally would, and you must use their API.

2 years ago
Load more