init
Browse files- model_speaker_embedding.py +14 -14
model_speaker_embedding.py
CHANGED
@@ -35,41 +35,41 @@ class W2VBERTEmbedding:
|
|
35 |
# HuBERT #
|
36 |
##########
|
37 |
class HuBERTXLEmbedding(W2VBERTEmbedding):
|
38 |
-
def __init__(self):
|
39 |
-
super().__init__("facebook/hubert-xlarge-ll60k")
|
40 |
|
41 |
|
42 |
class HuBERTLargeEmbedding(W2VBERTEmbedding):
|
43 |
-
def __init__(self):
|
44 |
-
super().__init__("facebook/hubert-large-ll60k")
|
45 |
|
46 |
|
47 |
class HuBERTBaseEmbedding(W2VBERTEmbedding):
|
48 |
-
def __init__(self):
|
49 |
-
super().__init__("facebook/hubert-base-ls960")
|
50 |
|
51 |
|
52 |
###########
|
53 |
# wav2vec #
|
54 |
###########
|
55 |
class Wav2VecEmbedding(W2VBERTEmbedding):
|
56 |
-
def __init__(self):
|
57 |
-
super().__init__("facebook/wav2vec2-large-xlsr-53")
|
58 |
|
59 |
|
60 |
#########
|
61 |
# XLS-R #
|
62 |
#########
|
63 |
class XLSR2BEmbedding(W2VBERTEmbedding):
|
64 |
-
def __init__(self):
|
65 |
-
super().__init__("facebook/wav2vec2-xls-r-2b")
|
66 |
|
67 |
|
68 |
class XLSR1BEmbedding(W2VBERTEmbedding):
|
69 |
-
def __init__(self):
|
70 |
-
super().__init__("facebook/wav2vec2-xls-r-1b")
|
71 |
|
72 |
|
73 |
class XLSR300MEmbedding(W2VBERTEmbedding):
|
74 |
-
def __init__(self):
|
75 |
-
super().__init__("facebook/wav2vec2-xls-r-300m")
|
|
|
35 |
# HuBERT #
|
36 |
##########
|
37 |
class HuBERTXLEmbedding(W2VBERTEmbedding):
|
38 |
+
def __init__(self, mean_pool: bool = True):
|
39 |
+
super().__init__("facebook/hubert-xlarge-ll60k", mean_pool=mean_pool)
|
40 |
|
41 |
|
42 |
class HuBERTLargeEmbedding(W2VBERTEmbedding):
|
43 |
+
def __init__(self, mean_pool: bool = True):
|
44 |
+
super().__init__("facebook/hubert-large-ll60k", mean_pool=mean_pool)
|
45 |
|
46 |
|
47 |
class HuBERTBaseEmbedding(W2VBERTEmbedding):
|
48 |
+
def __init__(self, mean_pool: bool = True):
|
49 |
+
super().__init__("facebook/hubert-base-ls960", mean_pool=mean_pool)
|
50 |
|
51 |
|
52 |
###########
|
53 |
# wav2vec #
|
54 |
###########
|
55 |
class Wav2VecEmbedding(W2VBERTEmbedding):
|
56 |
+
def __init__(self, mean_pool: bool = True):
|
57 |
+
super().__init__("facebook/wav2vec2-large-xlsr-53", mean_pool=mean_pool)
|
58 |
|
59 |
|
60 |
#########
|
61 |
# XLS-R #
|
62 |
#########
|
63 |
class XLSR2BEmbedding(W2VBERTEmbedding):
|
64 |
+
def __init__(self, mean_pool: bool = True):
|
65 |
+
super().__init__("facebook/wav2vec2-xls-r-2b", mean_pool=mean_pool)
|
66 |
|
67 |
|
68 |
class XLSR1BEmbedding(W2VBERTEmbedding):
|
69 |
+
def __init__(self, mean_pool: bool = True):
|
70 |
+
super().__init__("facebook/wav2vec2-xls-r-1b", mean_pool=mean_pool)
|
71 |
|
72 |
|
73 |
class XLSR300MEmbedding(W2VBERTEmbedding):
|
74 |
+
def __init__(self, mean_pool: bool = True):
|
75 |
+
super().__init__("facebook/wav2vec2-xls-r-300m", mean_pool=mean_pool)
|