Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from playsound import playsound
- from pathlib import Path
- # audioFile = './botanic_british.mp3'
- audioFile = ''
- def play_sound():
- path = Path(audioFile).is_file()
- if path:
- playsound(audioFile)
- return 'ok'
- return "The file doesn't exists"
- err = play_sound()
- print(err)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement