<jupyter_start><jupyter_text>Author: [<NAME>](https://www.linkedin.com/in/yuntingchiu/)<jupyter_code>from google.colab import files
uploaded = files.upload()
import soundfile as sf
[data, fs] = sf.read("audio.wav")
print(data)
print(len(data))<jupyter_output>669438<jupyter_text>Audio to text<jupyter_code>!pip3 install SpeechRecognition pydub
import speech_recognition as sr

# initialize the recognizer
r = sr.Recognizer()
filename = "audio.wav"
with sr.AudioFile(filename) as source:
  # listen for the data (load audio to memory)
  audio = r.record(source)
try:
  text = r.recognize_google(audio)
  print("Text: "+text)
except Exception as e:
  print("Exception: "+str(e))
  print('Sorry.. texts cannot be captured..')

with open(str(124)+'_text.txt', "w") as f:
    f.writelines(text)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14163614163614163, 'fraction_numerical': 0.01221001221001221, 'mean_word_length': 6.068965517241379, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '662675', 'license': 'MIT', 'n_tokens_mistral': 310, 'n_tokens_neox': 295, 'n_words': 69, 'path': 'code/00.testing_and_debugging.ipynb', 'repo_name': 'twyunting/Deepfake_Video_Classifier2.0', 'size': '825'}