salmanmapkar commited on
Commit
65e44dc
1 Parent(s): eb1e73b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -25,7 +25,6 @@ import contextlib
25
  from sklearn.cluster import AgglomerativeClustering
26
  import numpy as np
27
 
28
-
29
  __FILES = set()
30
 
31
 
@@ -104,7 +103,7 @@ def Transcribe_V1(NumberOfSpeakers, SpeakerNames="", audio="temp_audio.wav"):
104
  return f"dz_{audio}.wav", dzList, segments
105
 
106
  def transcribe(dz_audio):
107
- model = whisper.load_model("medium")
108
  result = model.transcribe(dz_audio)
109
  # for _ in result['segments']:
110
  # print(_['start'], _['end'], _['text'])
@@ -139,7 +138,7 @@ def Transcribe_V1(NumberOfSpeakers, SpeakerNames="", audio="temp_audio.wav"):
139
 
140
 
141
  def Transcribe_V2(num_speakers, speaker_names, audio="temp_audio.wav"):
142
- model = whisper.load_model("large")
143
  embedding_model = PretrainedSpeakerEmbedding(
144
  "speechbrain/spkrec-ecapa-voxceleb",
145
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
 
25
  from sklearn.cluster import AgglomerativeClustering
26
  import numpy as np
27
 
 
28
  __FILES = set()
29
 
30
 
 
103
  return f"dz_{audio}.wav", dzList, segments
104
 
105
  def transcribe(dz_audio):
106
+ model = whisper.load_model("large_v2")
107
  result = model.transcribe(dz_audio)
108
  # for _ in result['segments']:
109
  # print(_['start'], _['end'], _['text'])
 
138
 
139
 
140
  def Transcribe_V2(num_speakers, speaker_names, audio="temp_audio.wav"):
141
+ model = whisper.load_model("large_v2")
142
  embedding_model = PretrainedSpeakerEmbedding(
143
  "speechbrain/spkrec-ecapa-voxceleb",
144
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')