How to import Wave files into python?

T

twilkins50

How exactly do I import a .wav file and run it?
also is it possible to run it inside a while loop if so or it just start playing when its run? - Tom 14
 
J

Joel Goldstick

How exactly do I import a .wav file and run it?
also is it possible to run it inside a while loop if so or it just start
playing when its run? - Tom 14


Hi. How exactly have you tried to import a wave file? If you have a short
example of code, (python 2x or 3x) and what OS you will get probably get
some help

Have you googled this: "python play wav file"

Looks like there is something there that might help you get started
 
I

ishish

How exactly do I import a .wav file and run it?
also is it possible to run it inside a while loop if so or it just
start playing when its run? - Tom 14
--

For the GUI (Tkinter) there is tkSnack.
If you want to run it from the command line you could use sox.
 
D

diesch111

How exactly do I import a .wav file and run it?

also is it possible to run it inside a while loop if so or it just start playing when its run? - Tom 14

Using Pyside/PyQt you can play wave files this way ...
QSound.play(wave_filename)
 
D

diesch111

How exactly do I import a .wav file and run it?

also is it possible to run it inside a while loop if so or it just start playing when its run? - Tom 14

QSound.play(wave_file)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top