How to Stop and Play Music Using Python (Simple) (Winsound)

preview_player
Показать описание
How to Stop and Play Music Using Python (Simple) (Winsound)

Greetings, today we are here with another Python sound tutorial, using the Winsound library. In this tutorial we will cover how to stop audio upon user input and then play audio when the user provides input.

This method only works with wav files.

This is the closest you can get to pausing audio using the winsound library. This feature is super handy when you need to force stop a sound or play a sound when a certain condition is met.

Thanks for watching this how to stop and play music using Python Winsound video.

How to Stop and Play Music Using Python (Simple) (Winsound)
Рекомендации по теме
Комментарии
Автор

Hello

Is it possible to start, stop, control next music from soundcloud with python via voice recognition?

SILVRFRE
Автор

Is it possible to setting time so it would play every minutes? If it yes, can u give me the example for the time script

jenithaputri
Автор

this very helpful but i cant play anything else after stopping it, the program just stops.

polartblock
Автор

what if it only plays the windows sound and not the desired sound?

import winsound

winsound.PlaySound("E:\Projects\Python\lego.mp3", winsound.SND_ASYNC)

print("test")

sadoki
visit shbcf.ru