Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. os.listdir('../input/voice-commands/prateek_voice_v2')
  2. filepath='../input/voice-commands/prateek_voice_v2'
  3.  
  4. #reading the voice commands
  5. samples, sample_rate = librosa.load(filepath + '/' + 'stop.wav', sr = 16000)
  6. samples = librosa.resample(samples, sample_rate, 8000)
  7. ipd.Audio(samples,rate=8000)
  8.  
  9. predict(samples)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement