OpenSTBench 0.3.3__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstbench-1.1.0/LICENSE +21 -0
- openstbench-1.1.0/PKG-INFO +191 -0
- openstbench-1.1.0/README.md +139 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/pyproject.toml +6 -5
- openstbench-1.1.0/src/OpenSTBench.egg-info/PKG-INFO +191 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/OpenSTBench.egg-info/SOURCES.txt +1 -1
- {openstbench-0.3.3 → openstbench-1.1.0}/src/OpenSTBench.egg-info/requires.txt +1 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/__init__.py +20 -26
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/emotion_evaluator.py +47 -47
- openstbench-1.1.0/src/openstbench/latency/__init__.py +14 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/latency/agent.py +10 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/latency/basics.py +10 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/latency/cli.py +10 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/latency/instance.py +15 -5
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/latency/metrics.py +10 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/latency/utils.py +10 -0
- openstbench-1.1.0/src/openstbench/paralinguistic_evaluator.py +1054 -0
- openstbench-1.1.0/src/openstbench/speaker_similarity_evaluator.py +163 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/speech_quality_evaluator.py +22 -28
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/translation_evaluator.py +30 -36
- openstbench-0.3.3/PKG-INFO +0 -212
- openstbench-0.3.3/README.md +0 -163
- openstbench-0.3.3/src/OpenSTBench.egg-info/PKG-INFO +0 -212
- openstbench-0.3.3/src/openstbench/dataset.py +0 -199
- openstbench-0.3.3/src/openstbench/latency/__init__.py +0 -4
- openstbench-0.3.3/src/openstbench/paralinguistic_evaluator.py +0 -1331
- openstbench-0.3.3/src/openstbench/speaker_similarity_evaluator.py +0 -155
- {openstbench-0.3.3 → openstbench-1.1.0}/setup.cfg +0 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/OpenSTBench.egg-info/dependency_links.txt +0 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/OpenSTBench.egg-info/top_level.txt +0 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/_model_loading.py +0 -0
- {openstbench-0.3.3 → openstbench-1.1.0}/src/openstbench/temporal_consistency_evaluator.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yanjie An
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: OpenSTBench
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Unified multidimensional evaluation toolkit for S2TT and S2ST systems in offline and streaming speech translation settings
|
|
5
|
+
Author-email: Yanjie An <691476922@qq.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/sjtuayj/OpenSTBench
|
|
8
|
+
Project-URL: Repository, https://github.com/sjtuayj/OpenSTBench
|
|
9
|
+
Project-URL: Documentation, https://github.com/sjtuayj/OpenSTBench#readme
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/sjtuayj/OpenSTBench/issues
|
|
11
|
+
Keywords: translation,evaluation,BLEU,COMET,BLEURT,speech-translation,S2TT,S2ST,streaming,latency,temporal-consistency,UTMOS,WER,speaker-preservation,emotion,paralinguistics,CLAP,audio-events
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Requires-Python: <3.11,>=3.9
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: torch<2.7,>=2.6
|
|
21
|
+
Requires-Dist: torchaudio<2.7,>=2.6
|
|
22
|
+
Requires-Dist: numpy
|
|
23
|
+
Requires-Dist: sacrebleu>=2.0.0
|
|
24
|
+
Requires-Dist: pandas
|
|
25
|
+
Requires-Dist: tqdm
|
|
26
|
+
Requires-Dist: scipy
|
|
27
|
+
Requires-Dist: soundfile
|
|
28
|
+
Requires-Dist: jiwer
|
|
29
|
+
Requires-Dist: textgrid
|
|
30
|
+
Requires-Dist: transformers
|
|
31
|
+
Requires-Dist: matplotlib
|
|
32
|
+
Requires-Dist: resemblyzer
|
|
33
|
+
Provides-Extra: comet
|
|
34
|
+
Requires-Dist: unbabel-comet>=2.2.2; extra == "comet"
|
|
35
|
+
Provides-Extra: whisper
|
|
36
|
+
Requires-Dist: openai-whisper; extra == "whisper"
|
|
37
|
+
Provides-Extra: speech-quality
|
|
38
|
+
Requires-Dist: jiwer; extra == "speech-quality"
|
|
39
|
+
Provides-Extra: emotion
|
|
40
|
+
Requires-Dist: funasr; extra == "emotion"
|
|
41
|
+
Requires-Dist: modelscope; extra == "emotion"
|
|
42
|
+
Provides-Extra: paralinguistics
|
|
43
|
+
Requires-Dist: transformers; extra == "paralinguistics"
|
|
44
|
+
Provides-Extra: all
|
|
45
|
+
Requires-Dist: unbabel-comet>=2.2.2; extra == "all"
|
|
46
|
+
Requires-Dist: openai-whisper; extra == "all"
|
|
47
|
+
Requires-Dist: jiwer; extra == "all"
|
|
48
|
+
Requires-Dist: funasr; extra == "all"
|
|
49
|
+
Requires-Dist: modelscope; extra == "all"
|
|
50
|
+
Requires-Dist: transformers; extra == "all"
|
|
51
|
+
Dynamic: license-file
|
|
52
|
+
|
|
53
|
+
# OpenSTBench
|
|
54
|
+
|
|
55
|
+
English | [中文](./README_zh.md)
|
|
56
|
+
|
|
57
|
+
[](https://pypi.org/project/OpenSTBench/)
|
|
58
|
+
[](https://www.python.org/downloads/)
|
|
59
|
+
[](LICENSE)
|
|
60
|
+
[](https://github.com/sjtuayj/OpenSTBench)
|
|
61
|
+
[](https://x-lance.sjtu.edu.cn/)
|
|
62
|
+
|
|
63
|
+
OpenSTBench is a multidimensional evaluation toolkit for speech translation. It is designed for heterogeneous systems, including speech-to-text translation (S2TT), speech-to-speech translation (S2ST), offline systems, and streaming systems.
|
|
64
|
+
|
|
65
|
+
The toolkit organizes evaluation into three dimensions:
|
|
66
|
+
|
|
67
|
+
- **Translation Quality**: whether the translated text preserves the source meaning.
|
|
68
|
+
- **Speech Quality**: whether generated speech is natural, text-consistent, speaker-preserving, emotion-preserving, and faithful to non-verbal or paralinguistic events.
|
|
69
|
+
- **Temporal Quality**: whether generated speech preserves duration structure and, for streaming systems, whether output is responsive.
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install OpenSTBench
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For local development:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install -e .
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Optional extras:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install "OpenSTBench[comet]"
|
|
87
|
+
pip install "OpenSTBench[whisper]"
|
|
88
|
+
pip install "OpenSTBench[speech_quality]"
|
|
89
|
+
pip install "OpenSTBench[emotion]"
|
|
90
|
+
pip install "OpenSTBench[paralinguistics]"
|
|
91
|
+
pip install "OpenSTBench[all]"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
BLEURT is installed separately:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pip install git+https://github.com/lucadiliello/bleurt-pytorch.git
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Package Names
|
|
101
|
+
|
|
102
|
+
- PyPI package: `OpenSTBench`
|
|
103
|
+
- Python import: `openstbench`
|
|
104
|
+
|
|
105
|
+
## Evaluation Dimensions
|
|
106
|
+
|
|
107
|
+
| Dimension | Evaluator | System type | Main outputs |
|
|
108
|
+
| :--- | :--- | :--- | :--- |
|
|
109
|
+
| Translation Quality | `TranslationEvaluator` | S2TT, S2ST transcripts | `sacreBLEU`, `chrF++`, `COMET`, `BLEURT` |
|
|
110
|
+
| Speech Quality | `SpeechQualityEvaluator` | S2ST | `UTMOS`, `WER_Consistency`, `CER_Consistency` |
|
|
111
|
+
| Speech Quality | `SpeakerSimilarityEvaluator` | S2ST | `average_wavlm_large_similarity`, `average_resemblyzer_similarity` |
|
|
112
|
+
| Speech Quality | `EmotionEvaluator` | S2ST | `Emotion2Vec_Cosine_Similarity`, `Audio_Emotion_Accuracy` |
|
|
113
|
+
| Speech Quality | `ParalinguisticEvaluator` | S2ST | `Acoustic_Event_Count_F1`, `Acoustic_Event_Localization_F1`, `Acoustic_Event_Onset_Error` |
|
|
114
|
+
| Temporal Quality | `TemporalConsistencyEvaluator` | S2ST | `Duration_Consistency_SLC_0.2`, `Duration_Consistency_SLC_0.4` |
|
|
115
|
+
| Temporal Quality | `LatencyEvaluator` | Streaming S2TT/S2ST | `First_Audio_Delay_(StartOffset_ms)`, `Overall_Translation_Delay_(ATD_ms)`, `End_Action_Delay_(CustomATD_ms)`, `Real_Time_Factor_(RTF)` |
|
|
116
|
+
|
|
117
|
+
Offline and streaming are supported system settings, not separate metric dimensions. Use the evaluators that match the available outputs: text, generated speech, source/target audio pairs, event annotations, or streaming traces.
|
|
118
|
+
|
|
119
|
+
## Datasets
|
|
120
|
+
|
|
121
|
+
The paper uses the following datasets. Please follow the license and access terms of each original dataset.
|
|
122
|
+
|
|
123
|
+
| Dataset | Used for | Link |
|
|
124
|
+
| :--- | :--- | :--- |
|
|
125
|
+
| MSLT dev | Translation quality, speech quality, temporal consistency, latency | [Microsoft Speech Language Translation Corpus](https://www.microsoft.com/en-us/download/details.aspx?id=54689) |
|
|
126
|
+
| LibriTTS-based paired speaker set | Speaker preservation | The constructed OpenSTBench paired set will be released through [GitHub Releases](https://github.com/sjtuayj/OpenSTBench/releases); the source corpus is [LibriTTS](https://www.openslr.org/60/) |
|
|
127
|
+
| RAVDESS | Emotion preservation | [Audio_Speech_Actors_01-24.zip](https://zenodo.org/records/1188976) from the RAVDESS Zenodo record |
|
|
128
|
+
| MCAE-SPPS | Emotion preservation | [MCAE-SPPS on OSF](https://doi.org/10.17605/OSF.IO/9JYZC) |
|
|
129
|
+
| NonverbalTTS test | Paralinguistic fidelity | [deepvk/NonverbalTTS](https://huggingface.co/datasets/deepvk/NonverbalTTS) |
|
|
130
|
+
| SynParaSpeech | Paralinguistic fidelity | [shawnpi/SynParaSpeech](https://huggingface.co/datasets/shawnpi/SynParaSpeech) |
|
|
131
|
+
|
|
132
|
+
## Quick Start
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
from openstbench import TranslationEvaluator
|
|
136
|
+
|
|
137
|
+
evaluator = TranslationEvaluator(
|
|
138
|
+
use_bleu=True,
|
|
139
|
+
use_chrf=True,
|
|
140
|
+
use_comet=False,
|
|
141
|
+
use_bleurt=False,
|
|
142
|
+
device="cuda",
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
scores = evaluator.evaluate_all(
|
|
146
|
+
reference=["我喜欢看电影。", "今天天气很好。"],
|
|
147
|
+
target_text=["我喜欢看电影。", "今天天气很好。"],
|
|
148
|
+
source=["I like watching movies.", "The weather is nice today."],
|
|
149
|
+
target_lang="zh",
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
print(scores)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Examples
|
|
156
|
+
|
|
157
|
+
Complete parameter templates are kept in `examples/`. The README intentionally stays compact; use these files for configurable parameters, input formats, and output fields.
|
|
158
|
+
|
|
159
|
+
- `examples/python/translation_eval.py`
|
|
160
|
+
- `examples/python/speech_quality_eval.py`
|
|
161
|
+
- `examples/python/speaker_similarity_eval.py`
|
|
162
|
+
- `examples/python/emotion_eval.py`
|
|
163
|
+
- `examples/python/paralinguistic_eval.py`
|
|
164
|
+
- `examples/python/paralinguistic_identity_baseline.py`
|
|
165
|
+
- `examples/python/temporal_consistency_eval.py`
|
|
166
|
+
- `examples/python/latency_eval.py`
|
|
167
|
+
- `examples/bash/install_extras.sh`
|
|
168
|
+
- `examples/bash/run_latency_cli.sh`
|
|
169
|
+
|
|
170
|
+
Latency can also be run from the module CLI:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
python -m openstbench.latency.cli --help
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Conventions
|
|
177
|
+
|
|
178
|
+
- Text inputs generally accept `list[str]`, one-sample-per-line `.txt` files, and `.json` files where supported by the evaluator.
|
|
179
|
+
- Audio inputs generally accept folders, `list[str]`, `.txt` path lists, and `.json` path lists where supported by the evaluator.
|
|
180
|
+
- For `zh`, `ja`, and `ko`, speech consistency reports `CER_Consistency`; other languages report `WER_Consistency`.
|
|
181
|
+
- Evaluators that accept pretrained model sources use a local-first rule. If the supplied local path exists, OpenSTBench uses it; otherwise it falls back to the configured remote model id.
|
|
182
|
+
- Optional dependencies are loaded only when the corresponding evaluator needs them.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
OpenSTBench's original code is released under the MIT License. See [LICENSE](LICENSE).
|
|
188
|
+
|
|
189
|
+
Some latency evaluation components include code adapted from [SimulEval](https://github.com/facebookresearch/SimulEval), which is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0). Those adapted portions are distributed under CC BY-SA 4.0. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for details.
|
|
190
|
+
|
|
191
|
+
The datasets referenced by OpenSTBench, including the datasets used in the paper, are not covered by the OpenSTBench code license. They are provided by their original authors or distributors under their own licenses and terms of use. Some datasets are restricted to research or non-commercial use.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# OpenSTBench
|
|
2
|
+
|
|
3
|
+
English | [中文](./README_zh.md)
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/OpenSTBench/)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://github.com/sjtuayj/OpenSTBench)
|
|
9
|
+
[](https://x-lance.sjtu.edu.cn/)
|
|
10
|
+
|
|
11
|
+
OpenSTBench is a multidimensional evaluation toolkit for speech translation. It is designed for heterogeneous systems, including speech-to-text translation (S2TT), speech-to-speech translation (S2ST), offline systems, and streaming systems.
|
|
12
|
+
|
|
13
|
+
The toolkit organizes evaluation into three dimensions:
|
|
14
|
+
|
|
15
|
+
- **Translation Quality**: whether the translated text preserves the source meaning.
|
|
16
|
+
- **Speech Quality**: whether generated speech is natural, text-consistent, speaker-preserving, emotion-preserving, and faithful to non-verbal or paralinguistic events.
|
|
17
|
+
- **Temporal Quality**: whether generated speech preserves duration structure and, for streaming systems, whether output is responsive.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install OpenSTBench
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For local development:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install -e .
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Optional extras:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install "OpenSTBench[comet]"
|
|
35
|
+
pip install "OpenSTBench[whisper]"
|
|
36
|
+
pip install "OpenSTBench[speech_quality]"
|
|
37
|
+
pip install "OpenSTBench[emotion]"
|
|
38
|
+
pip install "OpenSTBench[paralinguistics]"
|
|
39
|
+
pip install "OpenSTBench[all]"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
BLEURT is installed separately:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install git+https://github.com/lucadiliello/bleurt-pytorch.git
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Package Names
|
|
49
|
+
|
|
50
|
+
- PyPI package: `OpenSTBench`
|
|
51
|
+
- Python import: `openstbench`
|
|
52
|
+
|
|
53
|
+
## Evaluation Dimensions
|
|
54
|
+
|
|
55
|
+
| Dimension | Evaluator | System type | Main outputs |
|
|
56
|
+
| :--- | :--- | :--- | :--- |
|
|
57
|
+
| Translation Quality | `TranslationEvaluator` | S2TT, S2ST transcripts | `sacreBLEU`, `chrF++`, `COMET`, `BLEURT` |
|
|
58
|
+
| Speech Quality | `SpeechQualityEvaluator` | S2ST | `UTMOS`, `WER_Consistency`, `CER_Consistency` |
|
|
59
|
+
| Speech Quality | `SpeakerSimilarityEvaluator` | S2ST | `average_wavlm_large_similarity`, `average_resemblyzer_similarity` |
|
|
60
|
+
| Speech Quality | `EmotionEvaluator` | S2ST | `Emotion2Vec_Cosine_Similarity`, `Audio_Emotion_Accuracy` |
|
|
61
|
+
| Speech Quality | `ParalinguisticEvaluator` | S2ST | `Acoustic_Event_Count_F1`, `Acoustic_Event_Localization_F1`, `Acoustic_Event_Onset_Error` |
|
|
62
|
+
| Temporal Quality | `TemporalConsistencyEvaluator` | S2ST | `Duration_Consistency_SLC_0.2`, `Duration_Consistency_SLC_0.4` |
|
|
63
|
+
| Temporal Quality | `LatencyEvaluator` | Streaming S2TT/S2ST | `First_Audio_Delay_(StartOffset_ms)`, `Overall_Translation_Delay_(ATD_ms)`, `End_Action_Delay_(CustomATD_ms)`, `Real_Time_Factor_(RTF)` |
|
|
64
|
+
|
|
65
|
+
Offline and streaming are supported system settings, not separate metric dimensions. Use the evaluators that match the available outputs: text, generated speech, source/target audio pairs, event annotations, or streaming traces.
|
|
66
|
+
|
|
67
|
+
## Datasets
|
|
68
|
+
|
|
69
|
+
The paper uses the following datasets. Please follow the license and access terms of each original dataset.
|
|
70
|
+
|
|
71
|
+
| Dataset | Used for | Link |
|
|
72
|
+
| :--- | :--- | :--- |
|
|
73
|
+
| MSLT dev | Translation quality, speech quality, temporal consistency, latency | [Microsoft Speech Language Translation Corpus](https://www.microsoft.com/en-us/download/details.aspx?id=54689) |
|
|
74
|
+
| LibriTTS-based paired speaker set | Speaker preservation | The constructed OpenSTBench paired set will be released through [GitHub Releases](https://github.com/sjtuayj/OpenSTBench/releases); the source corpus is [LibriTTS](https://www.openslr.org/60/) |
|
|
75
|
+
| RAVDESS | Emotion preservation | [Audio_Speech_Actors_01-24.zip](https://zenodo.org/records/1188976) from the RAVDESS Zenodo record |
|
|
76
|
+
| MCAE-SPPS | Emotion preservation | [MCAE-SPPS on OSF](https://doi.org/10.17605/OSF.IO/9JYZC) |
|
|
77
|
+
| NonverbalTTS test | Paralinguistic fidelity | [deepvk/NonverbalTTS](https://huggingface.co/datasets/deepvk/NonverbalTTS) |
|
|
78
|
+
| SynParaSpeech | Paralinguistic fidelity | [shawnpi/SynParaSpeech](https://huggingface.co/datasets/shawnpi/SynParaSpeech) |
|
|
79
|
+
|
|
80
|
+
## Quick Start
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from openstbench import TranslationEvaluator
|
|
84
|
+
|
|
85
|
+
evaluator = TranslationEvaluator(
|
|
86
|
+
use_bleu=True,
|
|
87
|
+
use_chrf=True,
|
|
88
|
+
use_comet=False,
|
|
89
|
+
use_bleurt=False,
|
|
90
|
+
device="cuda",
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
scores = evaluator.evaluate_all(
|
|
94
|
+
reference=["我喜欢看电影。", "今天天气很好。"],
|
|
95
|
+
target_text=["我喜欢看电影。", "今天天气很好。"],
|
|
96
|
+
source=["I like watching movies.", "The weather is nice today."],
|
|
97
|
+
target_lang="zh",
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
print(scores)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Examples
|
|
104
|
+
|
|
105
|
+
Complete parameter templates are kept in `examples/`. The README intentionally stays compact; use these files for configurable parameters, input formats, and output fields.
|
|
106
|
+
|
|
107
|
+
- `examples/python/translation_eval.py`
|
|
108
|
+
- `examples/python/speech_quality_eval.py`
|
|
109
|
+
- `examples/python/speaker_similarity_eval.py`
|
|
110
|
+
- `examples/python/emotion_eval.py`
|
|
111
|
+
- `examples/python/paralinguistic_eval.py`
|
|
112
|
+
- `examples/python/paralinguistic_identity_baseline.py`
|
|
113
|
+
- `examples/python/temporal_consistency_eval.py`
|
|
114
|
+
- `examples/python/latency_eval.py`
|
|
115
|
+
- `examples/bash/install_extras.sh`
|
|
116
|
+
- `examples/bash/run_latency_cli.sh`
|
|
117
|
+
|
|
118
|
+
Latency can also be run from the module CLI:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
python -m openstbench.latency.cli --help
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Conventions
|
|
125
|
+
|
|
126
|
+
- Text inputs generally accept `list[str]`, one-sample-per-line `.txt` files, and `.json` files where supported by the evaluator.
|
|
127
|
+
- Audio inputs generally accept folders, `list[str]`, `.txt` path lists, and `.json` path lists where supported by the evaluator.
|
|
128
|
+
- For `zh`, `ja`, and `ko`, speech consistency reports `CER_Consistency`; other languages report `WER_Consistency`.
|
|
129
|
+
- Evaluators that accept pretrained model sources use a local-first rule. If the supplied local path exists, OpenSTBench uses it; otherwise it falls back to the configured remote model id.
|
|
130
|
+
- Optional dependencies are loaded only when the corresponding evaluator needs them.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## License
|
|
134
|
+
|
|
135
|
+
OpenSTBench's original code is released under the MIT License. See [LICENSE](LICENSE).
|
|
136
|
+
|
|
137
|
+
Some latency evaluation components include code adapted from [SimulEval](https://github.com/facebookresearch/SimulEval), which is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0). Those adapted portions are distributed under CC BY-SA 4.0. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for details.
|
|
138
|
+
|
|
139
|
+
The datasets referenced by OpenSTBench, including the datasets used in the paper, are not covered by the OpenSTBench code license. They are provided by their original authors or distributors under their own licenses and terms of use. Some datasets are restricted to research or non-commercial use.
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "OpenSTBench"
|
|
7
|
-
version = "
|
|
8
|
-
description = "
|
|
7
|
+
version = "1.1.0"
|
|
8
|
+
description = "Unified multidimensional evaluation toolkit for S2TT and S2ST systems in offline and streaming speech translation settings"
|
|
9
9
|
readme = {file = "README.md", content-type = "text/markdown"}
|
|
10
10
|
requires-python = ">=3.9,<3.11"
|
|
11
11
|
license = {text = "MIT"}
|
|
@@ -15,9 +15,9 @@ authors = [
|
|
|
15
15
|
|
|
16
16
|
keywords = [
|
|
17
17
|
"translation", "evaluation", "BLEU", "COMET", "BLEURT",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"paralinguistics", "CLAP", "audio-events"
|
|
18
|
+
"speech-translation", "S2TT", "S2ST", "streaming", "latency",
|
|
19
|
+
"temporal-consistency", "UTMOS", "WER", "speaker-preservation",
|
|
20
|
+
"emotion", "paralinguistics", "CLAP", "audio-events"
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
classifiers = [
|
|
@@ -37,6 +37,7 @@ dependencies = [
|
|
|
37
37
|
"tqdm",
|
|
38
38
|
"scipy",
|
|
39
39
|
"soundfile",
|
|
40
|
+
"jiwer",
|
|
40
41
|
"textgrid",
|
|
41
42
|
"transformers",
|
|
42
43
|
"matplotlib",
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: OpenSTBench
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Unified multidimensional evaluation toolkit for S2TT and S2ST systems in offline and streaming speech translation settings
|
|
5
|
+
Author-email: Yanjie An <691476922@qq.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/sjtuayj/OpenSTBench
|
|
8
|
+
Project-URL: Repository, https://github.com/sjtuayj/OpenSTBench
|
|
9
|
+
Project-URL: Documentation, https://github.com/sjtuayj/OpenSTBench#readme
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/sjtuayj/OpenSTBench/issues
|
|
11
|
+
Keywords: translation,evaluation,BLEU,COMET,BLEURT,speech-translation,S2TT,S2ST,streaming,latency,temporal-consistency,UTMOS,WER,speaker-preservation,emotion,paralinguistics,CLAP,audio-events
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Requires-Python: <3.11,>=3.9
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: torch<2.7,>=2.6
|
|
21
|
+
Requires-Dist: torchaudio<2.7,>=2.6
|
|
22
|
+
Requires-Dist: numpy
|
|
23
|
+
Requires-Dist: sacrebleu>=2.0.0
|
|
24
|
+
Requires-Dist: pandas
|
|
25
|
+
Requires-Dist: tqdm
|
|
26
|
+
Requires-Dist: scipy
|
|
27
|
+
Requires-Dist: soundfile
|
|
28
|
+
Requires-Dist: jiwer
|
|
29
|
+
Requires-Dist: textgrid
|
|
30
|
+
Requires-Dist: transformers
|
|
31
|
+
Requires-Dist: matplotlib
|
|
32
|
+
Requires-Dist: resemblyzer
|
|
33
|
+
Provides-Extra: comet
|
|
34
|
+
Requires-Dist: unbabel-comet>=2.2.2; extra == "comet"
|
|
35
|
+
Provides-Extra: whisper
|
|
36
|
+
Requires-Dist: openai-whisper; extra == "whisper"
|
|
37
|
+
Provides-Extra: speech-quality
|
|
38
|
+
Requires-Dist: jiwer; extra == "speech-quality"
|
|
39
|
+
Provides-Extra: emotion
|
|
40
|
+
Requires-Dist: funasr; extra == "emotion"
|
|
41
|
+
Requires-Dist: modelscope; extra == "emotion"
|
|
42
|
+
Provides-Extra: paralinguistics
|
|
43
|
+
Requires-Dist: transformers; extra == "paralinguistics"
|
|
44
|
+
Provides-Extra: all
|
|
45
|
+
Requires-Dist: unbabel-comet>=2.2.2; extra == "all"
|
|
46
|
+
Requires-Dist: openai-whisper; extra == "all"
|
|
47
|
+
Requires-Dist: jiwer; extra == "all"
|
|
48
|
+
Requires-Dist: funasr; extra == "all"
|
|
49
|
+
Requires-Dist: modelscope; extra == "all"
|
|
50
|
+
Requires-Dist: transformers; extra == "all"
|
|
51
|
+
Dynamic: license-file
|
|
52
|
+
|
|
53
|
+
# OpenSTBench
|
|
54
|
+
|
|
55
|
+
English | [中文](./README_zh.md)
|
|
56
|
+
|
|
57
|
+
[](https://pypi.org/project/OpenSTBench/)
|
|
58
|
+
[](https://www.python.org/downloads/)
|
|
59
|
+
[](LICENSE)
|
|
60
|
+
[](https://github.com/sjtuayj/OpenSTBench)
|
|
61
|
+
[](https://x-lance.sjtu.edu.cn/)
|
|
62
|
+
|
|
63
|
+
OpenSTBench is a multidimensional evaluation toolkit for speech translation. It is designed for heterogeneous systems, including speech-to-text translation (S2TT), speech-to-speech translation (S2ST), offline systems, and streaming systems.
|
|
64
|
+
|
|
65
|
+
The toolkit organizes evaluation into three dimensions:
|
|
66
|
+
|
|
67
|
+
- **Translation Quality**: whether the translated text preserves the source meaning.
|
|
68
|
+
- **Speech Quality**: whether generated speech is natural, text-consistent, speaker-preserving, emotion-preserving, and faithful to non-verbal or paralinguistic events.
|
|
69
|
+
- **Temporal Quality**: whether generated speech preserves duration structure and, for streaming systems, whether output is responsive.
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install OpenSTBench
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For local development:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install -e .
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Optional extras:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install "OpenSTBench[comet]"
|
|
87
|
+
pip install "OpenSTBench[whisper]"
|
|
88
|
+
pip install "OpenSTBench[speech_quality]"
|
|
89
|
+
pip install "OpenSTBench[emotion]"
|
|
90
|
+
pip install "OpenSTBench[paralinguistics]"
|
|
91
|
+
pip install "OpenSTBench[all]"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
BLEURT is installed separately:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pip install git+https://github.com/lucadiliello/bleurt-pytorch.git
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Package Names
|
|
101
|
+
|
|
102
|
+
- PyPI package: `OpenSTBench`
|
|
103
|
+
- Python import: `openstbench`
|
|
104
|
+
|
|
105
|
+
## Evaluation Dimensions
|
|
106
|
+
|
|
107
|
+
| Dimension | Evaluator | System type | Main outputs |
|
|
108
|
+
| :--- | :--- | :--- | :--- |
|
|
109
|
+
| Translation Quality | `TranslationEvaluator` | S2TT, S2ST transcripts | `sacreBLEU`, `chrF++`, `COMET`, `BLEURT` |
|
|
110
|
+
| Speech Quality | `SpeechQualityEvaluator` | S2ST | `UTMOS`, `WER_Consistency`, `CER_Consistency` |
|
|
111
|
+
| Speech Quality | `SpeakerSimilarityEvaluator` | S2ST | `average_wavlm_large_similarity`, `average_resemblyzer_similarity` |
|
|
112
|
+
| Speech Quality | `EmotionEvaluator` | S2ST | `Emotion2Vec_Cosine_Similarity`, `Audio_Emotion_Accuracy` |
|
|
113
|
+
| Speech Quality | `ParalinguisticEvaluator` | S2ST | `Acoustic_Event_Count_F1`, `Acoustic_Event_Localization_F1`, `Acoustic_Event_Onset_Error` |
|
|
114
|
+
| Temporal Quality | `TemporalConsistencyEvaluator` | S2ST | `Duration_Consistency_SLC_0.2`, `Duration_Consistency_SLC_0.4` |
|
|
115
|
+
| Temporal Quality | `LatencyEvaluator` | Streaming S2TT/S2ST | `First_Audio_Delay_(StartOffset_ms)`, `Overall_Translation_Delay_(ATD_ms)`, `End_Action_Delay_(CustomATD_ms)`, `Real_Time_Factor_(RTF)` |
|
|
116
|
+
|
|
117
|
+
Offline and streaming are supported system settings, not separate metric dimensions. Use the evaluators that match the available outputs: text, generated speech, source/target audio pairs, event annotations, or streaming traces.
|
|
118
|
+
|
|
119
|
+
## Datasets
|
|
120
|
+
|
|
121
|
+
The paper uses the following datasets. Please follow the license and access terms of each original dataset.
|
|
122
|
+
|
|
123
|
+
| Dataset | Used for | Link |
|
|
124
|
+
| :--- | :--- | :--- |
|
|
125
|
+
| MSLT dev | Translation quality, speech quality, temporal consistency, latency | [Microsoft Speech Language Translation Corpus](https://www.microsoft.com/en-us/download/details.aspx?id=54689) |
|
|
126
|
+
| LibriTTS-based paired speaker set | Speaker preservation | The constructed OpenSTBench paired set will be released through [GitHub Releases](https://github.com/sjtuayj/OpenSTBench/releases); the source corpus is [LibriTTS](https://www.openslr.org/60/) |
|
|
127
|
+
| RAVDESS | Emotion preservation | [Audio_Speech_Actors_01-24.zip](https://zenodo.org/records/1188976) from the RAVDESS Zenodo record |
|
|
128
|
+
| MCAE-SPPS | Emotion preservation | [MCAE-SPPS on OSF](https://doi.org/10.17605/OSF.IO/9JYZC) |
|
|
129
|
+
| NonverbalTTS test | Paralinguistic fidelity | [deepvk/NonverbalTTS](https://huggingface.co/datasets/deepvk/NonverbalTTS) |
|
|
130
|
+
| SynParaSpeech | Paralinguistic fidelity | [shawnpi/SynParaSpeech](https://huggingface.co/datasets/shawnpi/SynParaSpeech) |
|
|
131
|
+
|
|
132
|
+
## Quick Start
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
from openstbench import TranslationEvaluator
|
|
136
|
+
|
|
137
|
+
evaluator = TranslationEvaluator(
|
|
138
|
+
use_bleu=True,
|
|
139
|
+
use_chrf=True,
|
|
140
|
+
use_comet=False,
|
|
141
|
+
use_bleurt=False,
|
|
142
|
+
device="cuda",
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
scores = evaluator.evaluate_all(
|
|
146
|
+
reference=["我喜欢看电影。", "今天天气很好。"],
|
|
147
|
+
target_text=["我喜欢看电影。", "今天天气很好。"],
|
|
148
|
+
source=["I like watching movies.", "The weather is nice today."],
|
|
149
|
+
target_lang="zh",
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
print(scores)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Examples
|
|
156
|
+
|
|
157
|
+
Complete parameter templates are kept in `examples/`. The README intentionally stays compact; use these files for configurable parameters, input formats, and output fields.
|
|
158
|
+
|
|
159
|
+
- `examples/python/translation_eval.py`
|
|
160
|
+
- `examples/python/speech_quality_eval.py`
|
|
161
|
+
- `examples/python/speaker_similarity_eval.py`
|
|
162
|
+
- `examples/python/emotion_eval.py`
|
|
163
|
+
- `examples/python/paralinguistic_eval.py`
|
|
164
|
+
- `examples/python/paralinguistic_identity_baseline.py`
|
|
165
|
+
- `examples/python/temporal_consistency_eval.py`
|
|
166
|
+
- `examples/python/latency_eval.py`
|
|
167
|
+
- `examples/bash/install_extras.sh`
|
|
168
|
+
- `examples/bash/run_latency_cli.sh`
|
|
169
|
+
|
|
170
|
+
Latency can also be run from the module CLI:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
python -m openstbench.latency.cli --help
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Conventions
|
|
177
|
+
|
|
178
|
+
- Text inputs generally accept `list[str]`, one-sample-per-line `.txt` files, and `.json` files where supported by the evaluator.
|
|
179
|
+
- Audio inputs generally accept folders, `list[str]`, `.txt` path lists, and `.json` path lists where supported by the evaluator.
|
|
180
|
+
- For `zh`, `ja`, and `ko`, speech consistency reports `CER_Consistency`; other languages report `WER_Consistency`.
|
|
181
|
+
- Evaluators that accept pretrained model sources use a local-first rule. If the supplied local path exists, OpenSTBench uses it; otherwise it falls back to the configured remote model id.
|
|
182
|
+
- Optional dependencies are loaded only when the corresponding evaluator needs them.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
OpenSTBench's original code is released under the MIT License. See [LICENSE](LICENSE).
|
|
188
|
+
|
|
189
|
+
Some latency evaluation components include code adapted from [SimulEval](https://github.com/facebookresearch/SimulEval), which is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0). Those adapted portions are distributed under CC BY-SA 4.0. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for details.
|
|
190
|
+
|
|
191
|
+
The datasets referenced by OpenSTBench, including the datasets used in the paper, are not covered by the OpenSTBench code license. They are provided by their original authors or distributors under their own licenses and terms of use. Some datasets are restricted to research or non-commercial use.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
LICENSE
|
|
1
2
|
README.md
|
|
2
3
|
pyproject.toml
|
|
3
4
|
src/OpenSTBench.egg-info/PKG-INFO
|
|
@@ -7,7 +8,6 @@ src/OpenSTBench.egg-info/requires.txt
|
|
|
7
8
|
src/OpenSTBench.egg-info/top_level.txt
|
|
8
9
|
src/openstbench/__init__.py
|
|
9
10
|
src/openstbench/_model_loading.py
|
|
10
|
-
src/openstbench/dataset.py
|
|
11
11
|
src/openstbench/emotion_evaluator.py
|
|
12
12
|
src/openstbench/paralinguistic_evaluator.py
|
|
13
13
|
src/openstbench/speaker_similarity_evaluator.py
|