Spaces:
Runtime error
Runtime error
JackismyShephard
commited on
Commit
Β·
325312c
1
Parent(s):
705c4f9
add new embeddings and change speech enhancement settings
Browse files- app.py +9 -8
- embeddings/male_51_vest_sudsjaelland.npy +0 -3
- embeddings/{female_23_vestjylland.npy β nst-da-metricgan-plus/female_23_vestjylland.npy} +1 -1
- embeddings/{female_24_storkoebenhavn.npy β nst-da-metricgan-plus/female_24_storkoebenhavn.npy} +1 -1
- embeddings/{female_49_nordjylland.npy β nst-da-metricgan-plus/female_49_nordjylland.npy} +1 -1
- embeddings/{male_18_vest_sydsjaelland.npy β nst-da-metricgan-plus/male_18_vest_sydsjaelland.npy} +1 -1
- embeddings/{male_31_fyn.npy β nst-da-metricgan-plus/male_31_fyn.npy} +1 -1
- embeddings/nst-da-metricgan-plus/male_51_vest_sydsjaelland.npy +3 -0
- embeddings/nst-da-resemble-enhance/female_22_oestjylland.npy +3 -0
- embeddings/nst-da-resemble-enhance/female_24_storkoebenhavn.npy +3 -0
- embeddings/nst-da-resemble-enhance/female_44_nordjylland.npy +3 -0
- embeddings/nst-da-resemble-enhance/male_18_vest_syd_sjaelland.npy +3 -0
- embeddings/nst-da-resemble-enhance/male_31_fyn.npy +3 -0
- embeddings/nst-da-resemble-enhance/male_55_storkoebenhavn.npy +3 -0
- embeddings/nst-da/female_23_vestjylland.npy +3 -0
- embeddings/nst-da/female_24_storkoebenhavn.npy +3 -0
- embeddings/nst-da/female_49_nordjylland.npy +3 -0
- embeddings/nst-da/male_18_vest_sydsjaelland.npy +3 -0
- embeddings/nst-da/male_31_fyn.npy +3 -0
- embeddings/nst-da/male_51_vest_sydsjaelland.npy +3 -0
app.py
CHANGED
@@ -16,17 +16,18 @@ pipe = pipeline(
|
|
16 |
model=checkpoint_finetuned,
|
17 |
use_fast=True,
|
18 |
device=device,
|
19 |
-
revision
|
20 |
)
|
21 |
|
|
|
22 |
|
23 |
speaker_embeddings = {
|
24 |
-
"F23": "
|
25 |
-
"F24": "
|
26 |
-
"F49": "
|
27 |
-
"M51": "
|
28 |
-
"M18": "
|
29 |
-
"M31": "
|
30 |
}
|
31 |
|
32 |
|
@@ -86,7 +87,7 @@ def enhance_audio(waveform, sr, device="cuda"):
|
|
86 |
tensor = torch.tensor(waveform).float()
|
87 |
denoised, new_sr = denoise(tensor, sr, device)
|
88 |
enhanced, new_sr = enhance(
|
89 |
-
denoised, new_sr, device, nfe=
|
90 |
)
|
91 |
enhanced_cpu = enhanced.cpu().numpy()
|
92 |
return new_sr, enhanced_cpu
|
|
|
16 |
model=checkpoint_finetuned,
|
17 |
use_fast=True,
|
18 |
device=device,
|
19 |
+
revision=revision,
|
20 |
)
|
21 |
|
22 |
+
embeddings_dir = "embeddings/nst-da-metricgan-plus/"
|
23 |
|
24 |
speaker_embeddings = {
|
25 |
+
"F23": embeddings_dir + "female_23_vestjylland.npy",
|
26 |
+
"F24": embeddings_dir + "female_24_storkoebenhavn.npy",
|
27 |
+
"F49": embeddings_dir + "female_49_nordjylland.npy",
|
28 |
+
"M51": embeddings_dir + "male_51_vest_sydsjaelland.npy",
|
29 |
+
"M18": embeddings_dir + "male_18_vest_sydsjaelland.npy",
|
30 |
+
"M31": embeddings_dir + "male_31_fyn.npy",
|
31 |
}
|
32 |
|
33 |
|
|
|
87 |
tensor = torch.tensor(waveform).float()
|
88 |
denoised, new_sr = denoise(tensor, sr, device)
|
89 |
enhanced, new_sr = enhance(
|
90 |
+
denoised, new_sr, device, nfe=64, solver="midpoint", lambd=0.1, tau=0.5
|
91 |
)
|
92 |
enhanced_cpu = enhanced.cpu().numpy()
|
93 |
return new_sr, enhanced_cpu
|
embeddings/male_51_vest_sudsjaelland.npy
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:9739b13f1ca1b64ccf9a6354e1d799093e6a9b0137b87c92281db64b6647eded
|
3 |
-
size 2176
|
|
|
|
|
|
|
|
embeddings/{female_23_vestjylland.npy β nst-da-metricgan-plus/female_23_vestjylland.npy}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 2176
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7b86c2796dd4057e69d906bd53c7ea9e00d91c119df3ef2d3cad9a3fa4f98744
|
3 |
size 2176
|
embeddings/{female_24_storkoebenhavn.npy β nst-da-metricgan-plus/female_24_storkoebenhavn.npy}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 2176
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8d507a41f5ff0d49bd9175234e967903956477acc4aa05978ded2e7ac8b7ede1
|
3 |
size 2176
|
embeddings/{female_49_nordjylland.npy β nst-da-metricgan-plus/female_49_nordjylland.npy}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 2176
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8179c3ca38e13e018cc5c438f28681f09468ed20eb8d2e7de78c3e57c53bde4c
|
3 |
size 2176
|
embeddings/{male_18_vest_sydsjaelland.npy β nst-da-metricgan-plus/male_18_vest_sydsjaelland.npy}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 2176
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:755204ed3cca5b4815b6e2877214083da45d0fbc851e8170534d619c48c84a3b
|
3 |
size 2176
|
embeddings/{male_31_fyn.npy β nst-da-metricgan-plus/male_31_fyn.npy}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 2176
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:373825731696bd6d8291c8a54e2649fd92ad216993492d742084b98abb134839
|
3 |
size 2176
|
embeddings/nst-da-metricgan-plus/male_51_vest_sydsjaelland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6bebbdd421a9d1177f55e0c8050e813cf13322405f3a9e9a021187a3240c09e7
|
3 |
+
size 2176
|
embeddings/nst-da-resemble-enhance/female_22_oestjylland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d45dfb984b4261c4ccc73acfb08aaee6f057dcb5f391dd89f8959cc6a43f45a
|
3 |
+
size 2176
|
embeddings/nst-da-resemble-enhance/female_24_storkoebenhavn.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c0fa64a435d4abc876b9a3d62f540f6bc13b655635d7ee926edc81fe81c7d878
|
3 |
+
size 2176
|
embeddings/nst-da-resemble-enhance/female_44_nordjylland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:796eac35fd3530f7030638a476282893d57dbacbff9e68a584207ce69b07c30a
|
3 |
+
size 2176
|
embeddings/nst-da-resemble-enhance/male_18_vest_syd_sjaelland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e6eae5328954facea9a251f87f1f1efdbc57878d285586593957f1753cd35838
|
3 |
+
size 2176
|
embeddings/nst-da-resemble-enhance/male_31_fyn.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da9fed81ba968d7877ec2ca2416ca4713f4916f12ce2569ac8d605e0a31f87c3
|
3 |
+
size 2176
|
embeddings/nst-da-resemble-enhance/male_55_storkoebenhavn.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d36b34c8e0efb968071431ea3954697be3990c1e50bd82216237dff09f15b9c5
|
3 |
+
size 2176
|
embeddings/nst-da/female_23_vestjylland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6bb1f9bee64ac28831cda0b8058f9d0cf3de1395735df90851146d119797b0dc
|
3 |
+
size 2176
|
embeddings/nst-da/female_24_storkoebenhavn.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:40ae4302c8e6eeff11156f1832cc65ddbcac4b155dd09aa897b681da286a5295
|
3 |
+
size 2176
|
embeddings/nst-da/female_49_nordjylland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:65a136540a6ded14ba5868e48dbd182f0bd44e5a8e09d14a892ff9256671405b
|
3 |
+
size 2176
|
embeddings/nst-da/male_18_vest_sydsjaelland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:112e6ab713cbd4b7cfc0ae5f22885661a6aa5b5daaf88b8e35afc2c70a77f628
|
3 |
+
size 2176
|
embeddings/nst-da/male_31_fyn.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c112eaa675e3281eba9a48481a70fc8c67a4f19991a94930ab95f2632afc04c
|
3 |
+
size 2176
|
embeddings/nst-da/male_51_vest_sydsjaelland.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cc40251ce13731b4a3eabb077a954f12009de4e1563eca11d487deac46944fdb
|
3 |
+
size 2176
|