pratikshahp commited on
Commit
7b7b977
1 Parent(s): 9e5c989

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -1,2 +1,17 @@
 
 
 
1
  import streamlit as st
 
 
 
 
 
 
 
 
 
 
 
 
2
  st.write("hi")
 
1
+ import librosa
2
+ import torch
3
+ from transformers import Wav2Vec2ForCTC, Wav2Vec2Tokenizer
4
  import streamlit as st
5
+
6
+ #load pre-trained model and tokenizer
7
+ tokenizer = Wav2Vec2Tokenizer.from_pretrained("facebook/wav2vec2-base-960h")
8
+ model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-base-960h")
9
+
10
+ #load audio file
11
+ speech, rate = librosa.load("batman1.wav",sr=16000)
12
+
13
+
14
+
15
+
16
+
17
  st.write("hi")