Anna Sun commited on
Commit
090f38d
1 Parent(s): 8d7615c

cleanup source/tgt languages, rename SeamlessStreaming

Browse files
seamless_server/models/{s2s_m4t_expr-emma_v0.3 → SeamlessStreaming}/vad_s2st_sc_24khz_main.yaml RENAMED
File without changes
seamless_server/src/simuleval_agent_directory.py CHANGED
@@ -10,10 +10,11 @@ logger = logging.getLogger("socketio_server_pubsub")
10
  # fmt: off
11
  M4T_P0_LANGS = [
12
  "eng",
13
- "arb", "ben", "cmn", "deu", "fil",
14
- "fra", "hin", "ind", "ita", "jpn",
15
- "kor", "nld", "por", "rus", "spa",
16
- "swh", "tha", "tur", "urd", "vie",
 
17
  ]
18
  # fmt: on
19
 
@@ -28,7 +29,6 @@ class AgentWithInfo:
28
  agent,
29
  name: str,
30
  modalities: List[str],
31
- source_langs: List[str],
32
  target_langs: List[str],
33
  # Supported dynamic params are defined in StreamingTypes.ts
34
  dynamic_params: List[str] = [],
@@ -38,7 +38,6 @@ class AgentWithInfo:
38
  self.name = name
39
  self.description = description
40
  self.modalities = modalities
41
- self.source_langs = source_langs
42
  self.target_langs = target_langs
43
  self.dynamic_params = dynamic_params
44
 
@@ -47,7 +46,6 @@ class AgentWithInfo:
47
  "name": self.name,
48
  "description": self.description,
49
  "modalities": self.modalities,
50
- "sourceLangs": self.source_langs,
51
  "targetLangs": self.target_langs,
52
  "dynamicParams": self.dynamic_params,
53
  }
@@ -56,8 +54,8 @@ class AgentWithInfo:
56
  def load_from_json(cls, config: str):
57
  """
58
  Takes in JSON array of models to load in, e.g.
59
- [{"name": "s2s_m4t_emma-unity2_multidomain_v0.1", "description": "M4T model that supports simultaneous S2S and S2T", "modalities": ["s2t", "s2s"], "sourceLangs": ["arb", "ben", "hin", "ind", "ita", "jpn", "por", "rus", "spa", "swh", "tha", "tur", "urd", "vie"], "targetLangs": ["en"]},
60
- {"name": "s2s_m4t_expr-emma_v0.1", "description": "ES-EN expressive model that supports S2S and S2T", "modalities": ["s2t", "s2s"], "sourceLangs": ["arb", "ben", "hin", "ind", "ita", "jpn", "por", "rus", "spa", "swh", "tha", "tur", "urd", "vie"], "targetLangs": ["en"]}]
61
  """
62
  configs = json.loads(config)
63
  agents = []
@@ -68,7 +66,6 @@ class AgentWithInfo:
68
  agent=agent,
69
  name=config["name"],
70
  modalities=config["modalities"],
71
- source_langs=config["sourceLangs"],
72
  target_langs=config["targetLangs"],
73
  )
74
  )
@@ -77,16 +74,7 @@ class AgentWithInfo:
77
 
78
  class SimulevalAgentDirectory:
79
  # Available models. These are the directories where the models can be found, and also serve as an ID for the model.
80
- # s2t:
81
- s2t_es_en_agent = "s2t_es-en_tt-waitk_multidomain"
82
- s2t_en_es_agent = "s2t_en-es_tt-waitk_multidomain"
83
- s2t_es_en_emma_agent = "s2t_es-en_emma_multidomain_v0.3"
84
- s2t_en_es_emma_agent = "s2t_en-es_emma_multidomain_v0.3"
85
- # s2s:
86
- s2s_es_en_agent = "s2s_es-en_tt-waitk-unity2_multidomain"
87
- s2s_es_en_emma_agent = "s2s_es-en_emma-unity2_multidomain_v0.2"
88
- s2s_m4t_expr_emma_agent = "s2s_m4t_expr-emma_v0.3"
89
- s2s_m4t_emma_agent = "s2s_m4t_emma-unity2_multidomain_v0.4"
90
 
91
  def __init__(self):
92
  self.agents = []
@@ -123,7 +111,7 @@ class SimulevalAgentDirectory:
123
  self.add_agent(agent_info)
124
  else:
125
  s2s_m4t_expr_agent = self.build_agent_if_available(
126
- SimulevalAgentDirectory.s2s_m4t_expr_emma_agent,
127
  config_name="vad_s2st_sc_24khz_main.yaml",
128
  )
129
 
@@ -131,10 +119,9 @@ class SimulevalAgentDirectory:
131
  self.add_agent(
132
  AgentWithInfo(
133
  agent=s2s_m4t_expr_agent,
134
- name=SimulevalAgentDirectory.s2s_m4t_expr_emma_agent,
135
  modalities=["s2t", "s2s"],
136
- source_langs=M4T_P0_LANGS,
137
- target_langs=["eng", "spa", "fra", "deu", "ita", "cmn"],
138
  dynamic_params=["expressive"],
139
  description="multilingual expressive model that supports S2S and S2T",
140
  )
 
10
  # fmt: off
11
  M4T_P0_LANGS = [
12
  "eng",
13
+ "arb", "ben", "cat", "ces", "cmn", "cym", "dan",
14
+ "deu", "est", "fin", "fra", "hin", "ind", "ita",
15
+ "jpn", "kor", "mlt", "nld", "pes", "pol", "por",
16
+ "ron", "rus", "slk", "spa", "swe", "swh", "tel",
17
+ "tgl", "tha", "tur", "ukr", "urd", "uzn", "vie",
18
  ]
19
  # fmt: on
20
 
 
29
  agent,
30
  name: str,
31
  modalities: List[str],
 
32
  target_langs: List[str],
33
  # Supported dynamic params are defined in StreamingTypes.ts
34
  dynamic_params: List[str] = [],
 
38
  self.name = name
39
  self.description = description
40
  self.modalities = modalities
 
41
  self.target_langs = target_langs
42
  self.dynamic_params = dynamic_params
43
 
 
46
  "name": self.name,
47
  "description": self.description,
48
  "modalities": self.modalities,
 
49
  "targetLangs": self.target_langs,
50
  "dynamicParams": self.dynamic_params,
51
  }
 
54
  def load_from_json(cls, config: str):
55
  """
56
  Takes in JSON array of models to load in, e.g.
57
+ [{"name": "s2s_m4t_emma-unity2_multidomain_v0.1", "description": "M4T model that supports simultaneous S2S and S2T", "modalities": ["s2t", "s2s"], "targetLangs": ["en"]},
58
+ {"name": "s2s_m4t_expr-emma_v0.1", "description": "ES-EN expressive model that supports S2S and S2T", "modalities": ["s2t", "s2s"], "targetLangs": ["en"]}]
59
  """
60
  configs = json.loads(config)
61
  agents = []
 
66
  agent=agent,
67
  name=config["name"],
68
  modalities=config["modalities"],
 
69
  target_langs=config["targetLangs"],
70
  )
71
  )
 
74
 
75
  class SimulevalAgentDirectory:
76
  # Available models. These are the directories where the models can be found, and also serve as an ID for the model.
77
+ seamless_streaming_agent = "SeamlessStreaming"
 
 
 
 
 
 
 
 
 
78
 
79
  def __init__(self):
80
  self.agents = []
 
111
  self.add_agent(agent_info)
112
  else:
113
  s2s_m4t_expr_agent = self.build_agent_if_available(
114
+ SimulevalAgentDirectory.seamless_streaming_agent,
115
  config_name="vad_s2st_sc_24khz_main.yaml",
116
  )
117
 
 
119
  self.add_agent(
120
  AgentWithInfo(
121
  agent=s2s_m4t_expr_agent,
122
+ name=SimulevalAgentDirectory.seamless_streaming_agent,
123
  modalities=["s2t", "s2s"],
124
+ target_langs=["eng", "arb", "ben", "cat", "ces", "cmn", "cym", "dan", "deu", "est", "fin", "fra", "hin", "ind", "ita", "jpn", "kor", "mlt", "nld", "pes", "pol", "por", "ron", "rus", "slk", "spa", "swe", "swh", "tel", "tgl", "tha", "tur", "ukr", "urd", "uzn", "vie"],
 
125
  dynamic_params=["expressive"],
126
  description="multilingual expressive model that supports S2S and S2T",
127
  )
streaming-react-app/src/types/StreamingTypes.ts CHANGED
@@ -1,13 +1,3 @@
1
- export const SUPPORTED_LANGUAGE_CODES = ['en-US', 'es-ES'] as const;
2
-
3
- export type SupportedLanguageCode = (typeof SUPPORTED_LANGUAGE_CODES)[number];
4
-
5
- export type StartStreamingData = {
6
- inputLang: SupportedLanguageCode;
7
- outputLang: SupportedLanguageCode;
8
- outputMode: SupportedOutputMode;
9
- };
10
-
11
  interface ServerTranslationDataBase {
12
  eos: boolean;
13
  event: string;
@@ -36,7 +26,6 @@ export type AgentCapabilities = {
36
  name: string;
37
  description: string;
38
  modalities: Array<OutputModalitiesBase>;
39
- sourceLangs: Array<string>;
40
  targetLangs: Array<string>;
41
  dynamicParams: Array<DynamicParams>;
42
  };
@@ -74,7 +63,6 @@ export type StartStreamEventConfig = {
74
  event: 'config';
75
  rate: number;
76
  model_name: string;
77
- // source_language: SupportedLanguageCode;
78
  debug: boolean;
79
  async_processing: boolean;
80
  model_type: SupportedOutputMode;
@@ -123,7 +111,6 @@ export type TranslationSentences = Array<string>;
123
 
124
  export type DynamicConfig = {
125
  // targetLanguage: a 3-letter string representing the desired output language.
126
- // Supported languages are provided by the agent capabilities config
127
  targetLanguage: string;
128
  };
129
 
 
 
 
 
 
 
 
 
 
 
 
1
  interface ServerTranslationDataBase {
2
  eos: boolean;
3
  event: string;
 
26
  name: string;
27
  description: string;
28
  modalities: Array<OutputModalitiesBase>;
 
29
  targetLangs: Array<string>;
30
  dynamicParams: Array<DynamicParams>;
31
  };
 
63
  event: 'config';
64
  rate: number;
65
  model_name: string;
 
66
  debug: boolean;
67
  async_processing: boolean;
68
  model_type: SupportedOutputMode;
 
111
 
112
  export type DynamicConfig = {
113
  // targetLanguage: a 3-letter string representing the desired output language.
 
114
  targetLanguage: string;
115
  };
116