From e0b134fde1d0f83f9cfcb3fd91a45482c4211116 Mon Sep 17 00:00:00 2001 From: tarepan Date: Wed, 21 Feb 2024 04:36:15 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20`tts=5Fpipeline`=20=E3=82=B5?= =?UTF-8?q?=E3=83=96=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB=E3=83=AA?= =?UTF-8?q?=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/tts_pipeline/{test_mora_list.py => test_mora_mapping.py} | 2 +- .../{test_acoustic_feature_extractor.py => test_phoneme.py} | 2 +- voicevox_engine/tts_pipeline/kana_converter.py | 4 ++-- .../tts_pipeline/{mora_list.py => mora_mapping.py} | 2 +- .../{acoustic_feature_extractor.py => phoneme.py} | 0 voicevox_engine/tts_pipeline/text_analyzer.py | 2 +- voicevox_engine/tts_pipeline/tts_engine.py | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) rename test/tts_pipeline/{test_mora_list.py => test_mora_mapping.py} (91%) rename test/tts_pipeline/{test_acoustic_feature_extractor.py => test_phoneme.py} (96%) rename voicevox_engine/tts_pipeline/{mora_list.py => mora_mapping.py} (99%) rename voicevox_engine/tts_pipeline/{acoustic_feature_extractor.py => phoneme.py} (100%) diff --git a/test/tts_pipeline/test_mora_list.py b/test/tts_pipeline/test_mora_mapping.py similarity index 91% rename from test/tts_pipeline/test_mora_list.py rename to test/tts_pipeline/test_mora_mapping.py index 5cc497aeb..0791c0ef4 100644 --- a/test/tts_pipeline/test_mora_list.py +++ b/test/tts_pipeline/test_mora_mapping.py @@ -1,6 +1,6 @@ from unittest import TestCase -from voicevox_engine.tts_pipeline.mora_list import mora_phonemes_to_mora_kana +from voicevox_engine.tts_pipeline.mora_mapping import mora_phonemes_to_mora_kana class TestOpenJTalkMoraList(TestCase): diff --git a/test/tts_pipeline/test_acoustic_feature_extractor.py b/test/tts_pipeline/test_phoneme.py similarity index 96% rename from test/tts_pipeline/test_acoustic_feature_extractor.py rename to test/tts_pipeline/test_phoneme.py index 679e981c1..cc6dd8315 100644 --- a/test/tts_pipeline/test_acoustic_feature_extractor.py +++ b/test/tts_pipeline/test_phoneme.py @@ -2,7 +2,7 @@ import pytest -from voicevox_engine.tts_pipeline.acoustic_feature_extractor import Phoneme +from voicevox_engine.tts_pipeline.phoneme import Phoneme TRUE_NUM_PHONEME = 45 diff --git a/voicevox_engine/tts_pipeline/kana_converter.py b/voicevox_engine/tts_pipeline/kana_converter.py index c49ab8461..5310701cf 100644 --- a/voicevox_engine/tts_pipeline/kana_converter.py +++ b/voicevox_engine/tts_pipeline/kana_converter.py @@ -17,8 +17,8 @@ from typing import List, Optional from ..model import AccentPhrase, Mora, ParseKanaError, ParseKanaErrorCode -from .acoustic_feature_extractor import Vowel -from .mora_list import mora_kana_to_mora_phonemes +from .mora_mapping import mora_kana_to_mora_phonemes +from .phoneme import Vowel _LOOP_LIMIT = 300 diff --git a/voicevox_engine/tts_pipeline/mora_list.py b/voicevox_engine/tts_pipeline/mora_mapping.py similarity index 99% rename from voicevox_engine/tts_pipeline/mora_list.py rename to voicevox_engine/tts_pipeline/mora_mapping.py index c10931ae2..6a36775f2 100644 --- a/voicevox_engine/tts_pipeline/mora_list.py +++ b/voicevox_engine/tts_pipeline/mora_mapping.py @@ -44,7 +44,7 @@ from typing import Literal -from .acoustic_feature_extractor import BaseVowel, Consonant +from .phoneme import BaseVowel, Consonant # AquesTalk 風記法で記述されるモーラ(無声化 `_` を除く) _MoraKana = Literal[ diff --git a/voicevox_engine/tts_pipeline/acoustic_feature_extractor.py b/voicevox_engine/tts_pipeline/phoneme.py similarity index 100% rename from voicevox_engine/tts_pipeline/acoustic_feature_extractor.py rename to voicevox_engine/tts_pipeline/phoneme.py diff --git a/voicevox_engine/tts_pipeline/text_analyzer.py b/voicevox_engine/tts_pipeline/text_analyzer.py index 37fce007b..cbb9736e8 100644 --- a/voicevox_engine/tts_pipeline/text_analyzer.py +++ b/voicevox_engine/tts_pipeline/text_analyzer.py @@ -6,7 +6,7 @@ import pyopenjtalk from ..model import AccentPhrase, Mora -from .mora_list import mora_phonemes_to_mora_kana +from .mora_mapping import mora_phonemes_to_mora_kana OjtVowel = Literal[ "A", "E", "I", "N", "O", "U", "a", "cl", "e", "i", "o", "pau", "sil", "u" diff --git a/voicevox_engine/tts_pipeline/tts_engine.py b/voicevox_engine/tts_pipeline/tts_engine.py index 17d06c3e4..f80fcca13 100644 --- a/voicevox_engine/tts_pipeline/tts_engine.py +++ b/voicevox_engine/tts_pipeline/tts_engine.py @@ -10,9 +10,9 @@ from ..core.core_wrapper import CoreWrapper from ..metas.Metas import StyleId from ..model import AccentPhrase, AudioQuery, FrameAudioQuery, FramePhoneme, Mora, Score -from .acoustic_feature_extractor import Phoneme from .kana_converter import parse_kana -from .mora_list import mora_kana_to_mora_phonemes, mora_phonemes_to_mora_kana +from .mora_mapping import mora_kana_to_mora_phonemes, mora_phonemes_to_mora_kana +from .phoneme import Phoneme from .text_analyzer import text_to_accent_phrases # 疑問文語尾定数