SHARE
TWEET

Untitled

a guest Jun 25th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. y, sr = librosa.load('./uploads/{}.wav'.format(language_num))
  2. return(librosa.core.resample(y=y,orig_sr=sr,target_sr=RATE, scale=True))
  3.      
  4. return(np.array(segments))
  5.      
  6. segmented_mfccs = []
  7. print('yyy')
  8.  
  9. for mfcc in X_test:
  10.  
  11.     segmented_mfccs.append(segment_one(mfcc))
  12.     print('ggg')
  13. return(segmented_mfccs)
  14.      
  15. #pool = multiprocessing.Pool(processes=multiprocessing.cpu_count())
  16.  
  17. audio = 'arabic5'
  18. X_test= get_wav(audio)
  19. print(X_test)
  20. X_test=to_mfcc(X_test)
  21.  
  22. print(X_test)
  23.  
  24.  
  25. load_keras_model()
  26. print('hhh')
  27. #X_test = pool.map(get_wav, X_test)
  28. #X_test = pool.map(to_mfcc, X_test)
  29.  
  30. y_predicted =predict_class_all(create_segmented_mfccs(X_test), model)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top