You can run the code in vs code and pycharm.
Audio File Conversion:
It converts a list of input audio files in .m4a format to .wav format using the moviepy library.
Speech Recognition:
It uses the speech_recognition library to recognize the text from the converted audio files.
Text Preprocessing:
It preprocesses the recognized text by tokenizing, removing stop words, and converting to lowercase using the nltk library.
Cosine Similarity Calculation:
It calculates the cosine similarity between the preprocessed text and a reference text ("hello how are you") using the sklearn library.
Similarity Percentage Calculation:
It calculates the similarity percentage by multiplying the cosine similarity score by 100.
preprocess_text:
preprocesses the text by tokenizing, removing stop words, and converting to lowercase.
get_wordnet_pos:
determines the part-of-speech (POS) tag for a given word.
calculate_cosine_similarity:
calculates the cosine similarity between two texts.
main:
the main function that orchestrates the entire process.
moviepy: for audio file conversion
speech_recognition: for speech recognition
nltk: for text preprocessing and POS tagging
sklearn: for cosine similarity calculation