Spaces:
Running
Running
user01
commited on
Commit
·
b0c7e12
1
Parent(s):
cebdfdb
[update] cli package
Browse files- app.py +0 -6
- requirements.txt +1 -0
app.py
CHANGED
@@ -15,8 +15,6 @@
|
|
15 |
|
16 |
import gradio as gr
|
17 |
import wespeaker
|
18 |
-
# import wespeakerruntime as wespeaker
|
19 |
-
# from sklearn.metrics.pairwise import cosine_similarity
|
20 |
|
21 |
STYLE = """
|
22 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha256-YvdLHPgkqJ8DVUxjjnGVlMMJtNimJ6dYkowFFvp4kKs=" crossorigin="anonymous">
|
@@ -62,10 +60,6 @@ def speaker_verification(audio_path1, audio_path2, lang='CN'):
|
|
62 |
else:
|
63 |
output = OUTPUT_ERROR.format('Please select a language')
|
64 |
return output
|
65 |
-
# emb1 = model.extract_embedding(audio_path1)
|
66 |
-
# emb2 = model.extract_embedding(audio_path2)
|
67 |
-
# cos_score = model.compute_cosine_score(emb1[0], emb2[0])
|
68 |
-
# cos_score = (cos_score + 1) / 2.0
|
69 |
cos_score = wespeaker.compute_similarity(audio_path1, audio_path2)
|
70 |
|
71 |
if cos_score >= 0.70:
|
|
|
15 |
|
16 |
import gradio as gr
|
17 |
import wespeaker
|
|
|
|
|
18 |
|
19 |
STYLE = """
|
20 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha256-YvdLHPgkqJ8DVUxjjnGVlMMJtNimJ6dYkowFFvp4kKs=" crossorigin="anonymous">
|
|
|
60 |
else:
|
61 |
output = OUTPUT_ERROR.format('Please select a language')
|
62 |
return output
|
|
|
|
|
|
|
|
|
63 |
cos_score = wespeaker.compute_similarity(audio_path1, audio_path2)
|
64 |
|
65 |
if cos_score >= 0.70:
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
gradio
|
2 |
wespeaker @ git+https://github.com/wenet-e2e/wespeaker.git
|
3 |
scikit-learn
|
|
|
|
1 |
gradio
|
2 |
wespeaker @ git+https://github.com/wenet-e2e/wespeaker.git
|
3 |
scikit-learn
|
4 |
+
httpx==0.24.1
|