diff --git a/README.MD b/README.MD index ee2f84b..5c4c199 100644 --- a/README.MD +++ b/README.MD @@ -5,13 +5,15 @@ You may be frequently using Google Assistant or Apple’s Siri or even Amazon Al  -TLDR Show me the code! +## TLDR Show me the code! + If you are impatient like me, this is practically the full source code that can be quickly copied, pasted, and executed through a Python file. Make sure to have a file named ‘my-audio.wav’ as your speech input. Also, make sure you have all the libraries installed. In the later part of the tutorial, we will be discussing what each of the lines is doing. Here’s the code! +
import torch
import librosa
import numpy as np
@@ -19,6 +21,8 @@ import soundfile as sf
from scipy.io import wavfile
from IPython.display import Audio
from transformers import Wav2Vec2ForCTC, Wav2Vec2Tokenizer
+
+
tokenizer = Wav2Vec2Tokenizer.from_pretrained("facebook/wav2vec2-base-960h")
model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-base-960h")
file_name = 'my-audio.wav'