From 8787b03619e7f150c8ea8811fc16fb311e049a82 Mon Sep 17 00:00:00 2001 From: Avinash Kumar <72934793+manuavii@users.noreply.github.com> Date: Thu, 21 Oct 2021 19:15:23 +0530 Subject: [PATCH] Create Playing wav and mp3 Files Using playsound --- Playing wav and mp3 Files Using playsound | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Playing wav and mp3 Files Using playsound diff --git a/Playing wav and mp3 Files Using playsound b/Playing wav and mp3 Files Using playsound new file mode 100644 index 0000000..6469ada --- /dev/null +++ b/Playing wav and mp3 Files Using playsound @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +# Import playsound module +from playsound import playsound + +# Input an existing wav filename +wavFile = input("Enter a wav filename: ") +# Play the wav file +playsound(wavFile) + +# Input an existing mp3 filename +mp3File = input("Enter a mp3 filename: ") +# Play the mp3 file +playsound(mp3File)