Python 3 Lesson 11: Play sounds

preview_player
Показать описание
Play .wav sound files in python.

Google the name of your sound and .wav and download your sounds. Then move them to the same folder as your python file.

If you get any errors, here's all the mistakes I've made:
Рекомендации по теме
Комментарии
Автор

Dude I've been struggling with errors for like 3 hours now, Thank god I found this video.

liviudan
Автор

wow that was direct and to the point. Bravo!

captaintech
Автор

Guys I figured it out by accident!! If you are using visual studio code, make sure you have the main folder open on the side panel, that contains all of the files. I only had the python file open by itself and that caused all of the linking errors for some reason.

nuenesta
Автор

import winsound

winsound.PlaySound("hey", winsound.SND_FILENAME)

sadlyaggressive
Автор

OMG! This man deserve millions of subscribers

wilbertraymundrayos
Автор

i spent a hour trying to play sound and this worked thank you.

re
Автор

Thanks for this, and a spoopy congrats on 666 subs!

shawnstweettube
Автор

Mine still gives me the Windows error sound. The file is a .wav, it's in the same folder as the python project, and this is the code:
import winsound
at the top, and the later on:
winsound.PlaySound("boop", winsound.SND_ASYNC)

Adding or removing the ".wav" at the end made no difference....

No spelling errors in the file name either.
changing it to winsound.SND_FILENAME just crashes the entire thing too... Please help

nuenesta
Автор

I've been trying for a long time to find a way to solve my problem! Thanks!

echvski
Автор

Excelente directo al punto, mil gracias.

elespumosoxd
Автор

Straight to the point. Definitely liked and subbed.

Aditya-ncch
Автор

Please help every single thing is right and it still plays the windows ping sound

bronson
Автор

This was very helpful! Thank you for the tutorial!

TheEpicplushgod
Автор

Yay! You use Thonny too! Thanks for the great tutorial!

bloodsweatandbeers
Автор

I like this!!! You just get right in to it!!!! That's what i like

hurtigejler
Автор

He doesn’t play the sound but doesn’t give me an error either any clue??

luisrodrigues
Автор

straight to the point I like it you waste no time

mavi
Автор

hello ...
but the winsound liberie don't exist

dab
Автор

it just gives me a windows error sound

dominicmcgreevy
Автор

wait when I do this it just makes the same sound as the volume thing instead of the actual sound

mavi