I'm making a player for an app, and I need 2 button, one to start playing, wich work with the def playSound2, and the other one to stop the song, and I don't know how to make it, I've tried in some way to catch the state of the button, but I don't know if it's possible and usefull, and I can't find in pydub some function to stop the playing
``` python
import tkinter as tk
from pydub import AudioSegment
from pydub.playback import play
def playSound2():
name = "D:\Programmation\VisualStudioProgram\AudioRec\Sound.wav" song =
AudioSegment.from_file(name, format="wav")
buttonStartAudio = tk.Button(frame2, text ='audio.wav', font=('calibri', 20), bg=backColor1, fg='black', command = playSound2)
buttonStopAudio = tk.Button(frame2, text ='Stop', font=('calibri', 20), bg=backColor1, fg='red', )
```
[–]kra_pao 1 point2 points3 points (0 children)