Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

リファクタリング: SynthesisEngineをモジュール化 #214

Merged
merged 10 commits into from
Dec 3, 2021

Conversation

aoirint
Copy link
Member

@aoirint aoirint commented Dec 3, 2021

内容

SynthesisEngineをモジュール化(__init__.pyでimportするように)します。

また、make_synthesis_engine関数を切り出します。

SynthesisEngine内で使われているmora関連の関数の切り出しは別PRに分割しています。

関連 Issue

ref #199
ref #119

@coveralls
Copy link

coveralls commented Dec 3, 2021

Pull Request Test Coverage Report for Build 1535336244

  • 17 of 35 (48.57%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-8.5%) to 84.441%

Changes Missing Coverage Covered Lines Changed/Added Lines %
voicevox_engine/synthesis_engine/make_synthesis_engine.py 5 23 21.74%
Totals Coverage Status
Change from base Build 1521474246: -8.5%
Covered Lines: 597
Relevant Lines: 707

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Dec 3, 2021

Coverage Result

Resultを開く
Name Stmts Miss Cover
voicevox_engine/init.py 0 0 coverage-100%
voicevox_engine/acoustic_feature_extractor.py 85 0 coverage-100%
voicevox_engine/full_context_label.py 160 7 coverage-96%
voicevox_engine/kana_parser.py 75 1 coverage-99%
voicevox_engine/model.py 70 7 coverage-90%
voicevox_engine/mora_list.py 4 0 coverage-100%
voicevox_engine/preset/Preset.py 12 0 coverage-100%
voicevox_engine/preset/PresetLoader.py 34 1 coverage-97%
voicevox_engine/preset/init.py 3 0 coverage-100%
voicevox_engine/synthesis_engine/init.py 4 0 coverage-100%
voicevox_engine/synthesis_engine/forwarder.py 76 66 coverage-13%
voicevox_engine/synthesis_engine/make_synthesis_engine.py 23 18 coverage-22%
voicevox_engine/synthesis_engine/synthesis_engine.py 124 7 coverage-94%
voicevox_engine/utility/init.py 2 0 coverage-100%
voicevox_engine/utility/connect_base64_waves.py 35 3 coverage-91%
TOTAL 707 110 coverage-84%

Copy link
Member

@takana-v takana-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

手元で動かしてみましたが特に問題ないように思いました。
将来的にはSynthesisEngine部分をcoreに移動もしくは別リポジトリ化するかもしれないので、その場合にも役に立つかなと思いました。
ref VOICEVOX/voicevox_core#43

voicevox_engine/cancellable_engine.py Show resolved Hide resolved
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

相対参照は煩雑になりがちで好きじゃなかったのですが、モジュール化を目指すなら確かに早退パスにした方が良いなと感じました。

voicevox_engine/synthesis_engine/Forwarder.py Outdated Show resolved Hide resolved
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@Hiroshiba Hiroshiba merged commit f7099ee into VOICEVOX:master Dec 3, 2021
@aoirint aoirint deleted the patch-synthesis-engine-module branch October 9, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants