Spaces:
Build error
Build error
Download test/test_mora_list.py from 2ndelement/voicevox: direct link, hf CLI and curl.
- Browser
- Download file 828 Bytes
-
https://huggingface.co/spaces/2ndelement/voicevox/resolve/main/test/test_mora_list.py
- Command line
-
hf download hf://spaces/2ndelement/voicevox/test/test_mora_list.py
-
curl -L -o test_mora_list.py https://huggingface.co/spaces/2ndelement/voicevox/resolve/main/test/test_mora_list.py
828 Bytes
| from unittest import TestCase | |
| from voicevox_engine.mora_list import openjtalk_mora2text | |
| class TestOpenJTalkMoraList(TestCase): | |
| def test_mora2text(self): | |
| self.assertEqual("ッ", openjtalk_mora2text["cl"]) | |
| self.assertEqual("ティ", openjtalk_mora2text["ti"]) | |
| self.assertEqual("トゥ", openjtalk_mora2text["tu"]) | |
| self.assertEqual("ディ", openjtalk_mora2text["di"]) | |
| # GitHub issue #60 | |
| self.assertEqual("ギェ", openjtalk_mora2text["gye"]) | |
| self.assertEqual("イェ", openjtalk_mora2text["ye"]) | |
| def test_mora2text_injective(self): | |
| """異なるモーラが同じ読みがなに対応しないか確認する""" | |
| values = list(openjtalk_mora2text.values()) | |
| uniq_values = list(set(values)) | |
| self.assertCountEqual(values, uniq_values) | |