From 1256a9dadfe26113e80170bfce3908cec7365db7 Mon Sep 17 00:00:00 2001 From: tarepan Date: Tue, 5 Dec 2023 14:56:59 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20=E5=90=8D=E8=A9=9E=E9=96=A2=E6=95=B0?= =?UTF-8?q?=E5=90=8D=E3=81=8B=E3=82=89=E5=8B=95=E8=A9=9E=E9=96=A2=E6=95=B0?= =?UTF-8?q?=E5=90=8D=E3=81=B8=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- voicevox_engine/synthesis_engine/synthesis_engine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/voicevox_engine/synthesis_engine/synthesis_engine.py b/voicevox_engine/synthesis_engine/synthesis_engine.py index 36de87a69..d80f4469f 100644 --- a/voicevox_engine/synthesis_engine/synthesis_engine.py +++ b/voicevox_engine/synthesis_engine/synthesis_engine.py @@ -110,7 +110,7 @@ def pre_process( return flatten_moras, phoneme_data_list -def silence_mora(length: float) -> Mora: +def generate_silence_mora(length: float) -> Mora: """無音モーラの生成""" return Mora(text=" ", vowel="sil", vowel_length=length, pitch=0.0) @@ -128,8 +128,8 @@ def change_silence(moras: list[Mora], query: AudioQuery) -> list[Mora]: moras : List[Mora] 前後無音が付加されたモーラ時系列 """ - silence_moras_head = [silence_mora(query.prePhonemeLength)] - silence_moras_tail = [silence_mora(query.postPhonemeLength)] + silence_moras_head = [generate_silence_mora(query.prePhonemeLength)] + silence_moras_tail = [generate_silence_mora(query.postPhonemeLength)] moras = silence_moras_head + moras + silence_moras_tail return moras