<jupyter_start><jupyter_text>google speech<jupyter_code>import speech_recognition as sr

r = sr.Recognizer()
with sr.AudioFile('assets/test.wav') as source:
    audio = r.record(source)
g_hyp = r.recognize_google(audio, language='fa-IR')
print(g_hyp)
g_cer = calc_cer(g_hyp, gt)
g_wer = calc_wer(g_hyp, gt)
print('cer:', g_cer, ' wer:', g_wer)<jupyter_output>cer: 0.03723404255319149  wer: 0.0425531914893617
{'fraction_non_alphanumeric': 0.14215686274509803, 'fraction_numerical': 0.0857843137254902, 'mean_word_length': 7.019607843137255, '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': '447560', 'license': 'MIT', 'n_tokens_mistral': 206, 'n_tokens_neox': 175, 'n_words': 30, 'path': 'inference.ipynb', 'repo_name': 's-omranpour/Wav2Vec2-XLSR-Finetune', 'size': '408'}