add password pretection
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def calc_mos(audio_path, ref):
|
|
102 |
# plot f0 with x axis as time
|
103 |
|
104 |
# spectrogram with x axis as time
|
105 |
-
pdb.set_trace()
|
106 |
spectrogram = torchaudio.transforms.MelSpectrogram(sample_rate=sr, n_fft=400, hop_length=160, n_mels=80)(wav)
|
107 |
|
108 |
spectrogram = torchaudio.transforms.AmplitudeToDB(stype="power", top_db=80)(spectrogram)
|
@@ -154,9 +154,9 @@ def calc_mos(audio_path, ref):
|
|
154 |
with open("local/description.md") as f:
|
155 |
description = f.read()
|
156 |
|
157 |
-
calc_mos("JOHN1.wav", "he would answer in a soft voice, 'I don't know.'")
|
|
|
158 |
|
159 |
-
pdb.set_trace()
|
160 |
examples = [
|
161 |
["local/Julianna_Set1_Author_01.wav", "Once upon a time, there was a young rat named Arthur who couldn't make up his mind."],
|
162 |
["local/Patient_Arthur_set1_002_noisy.wav", "Whenever the other rats asked him if he would like to go hunting with them, he would answer in a soft voice, 'I don't know.'"],
|
@@ -178,4 +178,4 @@ iface = gr.Interface(
|
|
178 |
examples=examples,
|
179 |
)
|
180 |
# add password to protect the interface
|
181 |
-
iface.launch(share=
|
|
|
102 |
# plot f0 with x axis as time
|
103 |
|
104 |
# spectrogram with x axis as time
|
105 |
+
# pdb.set_trace()
|
106 |
spectrogram = torchaudio.transforms.MelSpectrogram(sample_rate=sr, n_fft=400, hop_length=160, n_mels=80)(wav)
|
107 |
|
108 |
spectrogram = torchaudio.transforms.AmplitudeToDB(stype="power", top_db=80)(spectrogram)
|
|
|
154 |
with open("local/description.md") as f:
|
155 |
description = f.read()
|
156 |
|
157 |
+
# calc_mos("JOHN1.wav", "he would answer in a soft voice, 'I don't know.'")
|
158 |
+
|
159 |
|
|
|
160 |
examples = [
|
161 |
["local/Julianna_Set1_Author_01.wav", "Once upon a time, there was a young rat named Arthur who couldn't make up his mind."],
|
162 |
["local/Patient_Arthur_set1_002_noisy.wav", "Whenever the other rats asked him if he would like to go hunting with them, he would answer in a soft voice, 'I don't know.'"],
|
|
|
178 |
examples=examples,
|
179 |
)
|
180 |
# add password to protect the interface
|
181 |
+
iface.launch(share=False, auth=['Laronix', 'LaronixSLP'], auth_message="Authentication Required, ask kevin@laronix.com for password,\n Thanks for your cooperation!")
|