|
|
|
|
|
|
|
|
|
|
|
|
|
get_ipython().system('pip install nbimporter')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import warnings
|
|
warnings.filterwarnings("ignore")
|
|
import nbimporter
|
|
import os
|
|
import re
|
|
import torchaudio
|
|
from transformers import pipeline
|
|
from text2int import text_to_int
|
|
from isNumber import is_number
|
|
from Text2List import text_to_list
|
|
from convert2list import convert_to_list
|
|
from processDoubles import process_doubles
|
|
from replaceWords import replace_words
|
|
pipe = pipeline(task="automatic-speech-recognition", model="cdactvm/w2v-bert-2.0-hindi_v1")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
transcript = pipe("C:/Users/WCHL/Desktop/hindi_dataset/train/hindi_numbers_test/hindi7.mp3")
|
|
text_value = transcript['text']
|
|
processd_doubles=process_doubles(text_value)
|
|
|
|
replaced_words = replace_words(processd_doubles)
|
|
converted_text=text_to_int(replaced_words)
|
|
print(f"generated text : {text_value}")
|
|
print(f"processed doubles : {processd_doubles}")
|
|
|
|
print(f"replaced words : {replaced_words}")
|
|
print(f"final text : {converted_text}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|