Kevin676 commited on
Commit
a02f36d
1 Parent(s): 06e1773

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -32,7 +32,7 @@ import torchaudio
32
  from speechbrain.pretrained import SpectralMaskEnhancement
33
 
34
  import whisper
35
- model = whisper.load_model("small")
36
 
37
  import openai
38
 
@@ -125,9 +125,9 @@ def compute_spec(ref_file):
125
 
126
 
127
 
128
- def greet(Text, audio, Voicetoclone,VoiceMicrophone):
129
 
130
- openai.api_key = Text
131
 
132
  # load audio and pad/trim it to fit 30 seconds
133
  audio = whisper.load_audio(audio)
@@ -161,7 +161,7 @@ def greet(Text, audio, Voicetoclone,VoiceMicrophone):
161
 
162
  messages.append({"role": "assistant", "content": chat_response})
163
 
164
- text= "%s" % (chat_response)
165
  if Voicetoclone is not None:
166
  reference_files= "%s" % (Voicetoclone)
167
  print("path url")
 
32
  from speechbrain.pretrained import SpectralMaskEnhancement
33
 
34
  import whisper
35
+ model = whisper.load_model("tiny")
36
 
37
  import openai
38
 
 
125
 
126
 
127
 
128
+ def greet(Text2, audio, Voicetoclone,VoiceMicrophone):
129
 
130
+ openai.api_key = Text2
131
 
132
  # load audio and pad/trim it to fit 30 seconds
133
  audio = whisper.load_audio(audio)
 
161
 
162
  messages.append({"role": "assistant", "content": chat_response})
163
 
164
+ text= "%s" % (chat_response + "")
165
  if Voicetoclone is not None:
166
  reference_files= "%s" % (Voicetoclone)
167
  print("path url")