Biostar Beta. Not for public use.
How do play audio (playsound) in background of Python script?
1
Entering edit mode
4 months ago
Rohit • 10
India / Bangalore

I am just writing a small python game that I've learned from the Machine Learning course and I have a function that does the beginning narrative.

I am trying to get the audio to play in the background but unfortunately, the mp3 file plays first before the function continues.

How do I get it to run in the background?

> import playsound
> 
> def displayIntro():
> 
> playsound.playsound('storm.mp3',True)
> 
> print('')
> 
> print('')
> 
> print_slow('The year is 1845, you have just arrived home...')

Also, is there any way of controlling the volume of the play sound module?

I should add that I am using a Mac, and I am not wedded to using play sound, it just seems to be the only module that I can get working.

ADD COMMENTlink
0
Entering edit mode
ADD COMMENTlink
0
Entering edit mode
5 weeks ago
xevado2021 • 0

How do play audio (playsound) in background of python script? I have a complete solution for resumes planet review, Just come and tell me all the way which help you the most when you are trying to play sound in background. We also can solve many things about which we discuss here.

ADD COMMENTlink
0
Entering edit mode
5 weeks ago

nice information thank you for sharing. for more information about online coding classes and hadoop certification training online and tableau free training. python online course certification and many other courses with live projects visit h2kinfosys

ADD COMMENTlink
0
Entering edit mode
14 days ago
kerina • 0

thanks for sharing info for more about it online training visit our site.

ADD COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1