audio - Need aid on Python 3.4.1 with winsound -


i'm new python. decided try , write simple program allowed me play audio file. after hours of research, found out winsound , various different ways use it. however, have come confusion.

on 1 of many guides, told put audio files in folder somewhere on computer. pretty unhelpful.

i created folder in c:\\ drive named vsim, voice simulator. placing audio in audio file within vsim, attempted link 2 together. that's blew in face...

from tkinter import * import sys, random, winsound, tkinter.messagebox, time  if "c:\\vsim" not in sys.path:     sys.path.append("c:\\vsim")  def audio():      winsound.playsound("audio/ugh.wav", winsound.snd_nodefault)  mgui = tk() r = random m = tkinter.messagebox   mgui.title("voice simulator") mgui.geometry("500x250") mgui.resizable(height = 0, width = 0) mgui.configure(bg = "black")  label1 = label(mgui, text = "voice simulator alpha", fg = "green", bg   = "black") label1.pack(side = top) label2 = label(mgui, text = "please enter text:", fg = "red", bg = "black") label2.pack(side = top)  txtbox = stringvar() entry1 = entry(mgui, textvariable = txtbox) entry1.pack(side = top)  button1 = button(mgui, text = "create audio!", fg = "blue", bg = "yellow", command =  audio) button1.pack(side = top)   mgui.mainloop() 


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -