Questions tagged [python-playsound]

A single-function module for playing sounds according to a file-path or a URL.

PyPi page: https://pypi.org/project/playsound/

114 questions
0
votes
1 answer

Why is there silence when using playsound in another Process in PyCharm on Windows and how can I fix it?

Playsound is unable to play audio in a separate process when launched from PyCharm, while being able to work properly when launched from the command line. Trying to implement this solution leads to nothing being played despite p.is_alive() returning…
0
votes
0 answers

Python File Doesn't Run When Windows Starts

I have a problem. There are two Python files in the startup file. One of them runs seamlessly when Windows starts up, but the other one does not run automatically even though the code is correct. But interestingly, it works when I open it…
Eisberg
  • 1
  • 1
0
votes
0 answers

Error when trying to use playsound to play music

I'm trying to play sound using playsound. Here is the code I have. playsound('Chris Christodoulou - Coalescence Risk of Rain (2013).mp3') When it gets to this code though, I get this error. Traceback (most recent call last): File "main.py", line…
GoudyuGood
  • 73
  • 1
  • 7
0
votes
0 answers

Traceback (most recent call last) error, line 25, in assistant_speaks error and AttributeError: 'function' object has no attribute 'playsound' error

Hi I was making a voice asssitant in python 3.11.0 and got 5 errors. The first error was Traceback (most recent call last):File "E:\programs\python\tests\voice test\voice assitant.py", line 56, in The second Error…
0
votes
0 answers

Python playsound error, not recognized by MCI

I am using soundplay library to play a sound with the python However i got some error while doing so, Here is the piece of code that should play the sound, by converting a string into audio file import playsound # to play an audio file import…
Abhijeet
  • 140
  • 4
  • 14
0
votes
0 answers

Playing just first time. then PlaysoundException 263 for command:open test.mp3. The device isn't open/isn't recognized by MCI. occurs

import speech_recognition as sr from gtts import gTTS import playsound import os import datetime import calendar import webbrowser import weathercom import json import pywhatkit as kit r = sr.Recognizer() def…
0
votes
1 answer

Why is python giving an error when I play my second sound

I used from playsound import playsound and I tried running these two sounds in the same folder as the python folder. playsound('insert.mp3') playsound('beep.mp3') The first sound played, but when it got to the second one it said. Error 263 for…
JasoPC
  • 15
  • 7
0
votes
0 answers

Playsound not playing music

i tried to play a music file but failed from playsound import playsound playsound('play.mp3') but it shows the error Error 277 for command: open play.mp3 A problem occurred in initializing MCI also tried this before from playsound import…
0
votes
1 answer

Playsound does not work when the block value is set to false

okaayy so im working on a music player but it not working as i want so the problem is when i play the music using the playsound library it blocks the code from running and freezes the tkinter window but i searched and found out that you can set…
SwirX
  • 21
  • 7
0
votes
1 answer

How to change volume of Python's playsound

I'm using playsound library to successfully play an mp3 file: import playsound playsound.playsound('audio.mp3') However, it's too loud relative to the other sound sources on my computer. How do I decrease the volume? I don't wish to use pydub or…
Jase
  • 1,025
  • 1
  • 9
  • 34
0
votes
1 answer

Why does invoking the playsound module cause my script to crash?

The code: import time import playsound print('Study period in minutes?') studyMin = float(input()) print('Break period in minutes?') breakMin = float(input()) print('How many repetitions?') repe = int(input()) for i in range(repe): print('You…
0
votes
0 answers

Why is Eevee.wav not playing

I'm trying to get the Eevee.wav to play when both the key is clicked and PetHappyTF is 1. Anytime I hit E it doesnt play. I know the audio is fine because when i remove the first if it works. so... SOS! #importing stuff from playsound import…
Pig Empire
  • 11
  • 1
0
votes
1 answer

Python Freezes When I use PlaySound

When I use tkinter with playsound it frezes untill the sound is played. I have tried using block = False but then it dosnt play the sound at all! This is part of my code: from tkinter import * from tkinter import ttk from playsound import…
charsarg
  • 61
  • 3
0
votes
1 answer

Playsound does not work with multiprocessing

I want to use multiprocessing to play and stop a sound file at any time, but when I start the process no sound was played. from multiprocessing import Process from playsound import playsound def sound(): playsound('sound.mp3') p =…
TS518
  • 3
  • 2
0
votes
1 answer

How to use loops with playsound in python?

I am making a morse code program so I need to use loops with playsound module to play the short and long beeps again and again. The files are playing properly without a loop but when I add a loop I run into an error. from playsound import…