Biostar Beta. Not for public use.
Forum:How do play audio (playsound) in background of Python script?
1
Entering edit mode
8 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
4 months 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
3 months 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
3 months ago
kerina • 0

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

ADD COMMENTlink
0
Entering edit mode
10 weeks ago

Tableau course is a well-rounded program that covers various concepts such as, Tableau basics, numerous Tableau products, different visualization types, calculated fields, building interactive dashboards, sharing workbooks, etc.

ADD COMMENTlink
0
Entering edit mode
21 days ago

The author of this blog wants to tell us How do play audio (playsound) in the background of Python script? The easy and short way to play audio background is to make your own bundle jazz on this site you will receive all those scripts that you want?

ADD COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1