<jupyter_start><jupyter_text>Model Test<jupyter_code>from keras.models import load_model

model = load_model("voiceRecModel.hdf5")
def predict(audio):
    prob=model.predict(audio.reshape(1,8000,1))
    index=np.argmax(prob[0])
    return classes[index]

import random
index=random.randint(0,len(x_val)-1)
samples=x_val[index].ravel()
print("Audio:",classes[np.argmax(y_val[index])])
ipd.Audio(samples, rate=8000)


print("Text:",predict(samples))<jupyter_output>Text: five
{'fraction_non_alphanumeric': 0.160676532769556, 'fraction_numerical': 0.02959830866807611, 'mean_word_length': 8.673469387755102, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '435345', 'license': 'Apache-2.0', 'n_tokens_mistral': 189, 'n_tokens_neox': 180, 'n_words': 22, 'path': 'SpeechRecognition.ipynb', 'repo_name': 'The-SocialLion/Speech-Emotion-analysis-using-CNN-NLP', 'size': '473'}