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 Core情報都度取得 #803

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

tarepan
Copy link
Contributor

@tarepan tarepan commented Dec 2, 2023

内容

SynthesisEngine Core情報都度取得」機能の追加

関連 Issue

resolve #802

@tarepan tarepan mentioned this pull request Dec 2, 2023
3 tasks
Copy link

github-actions bot commented Dec 2, 2023

Coverage Result

Resultを開く
Name Stmts Miss Cover
run.py 480 326 coverage-32%
voicevox_engine/init.py 1 0 coverage-100%
voicevox_engine/acoustic_feature_extractor.py 23 0 coverage-100%
voicevox_engine/cancellable_engine.py 91 71 coverage-22%
voicevox_engine/dev/core/init.py 2 0 coverage-100%
voicevox_engine/dev/core/mock.py 27 12 coverage-56%
voicevox_engine/dev/synthesis_engine/init.py 2 0 coverage-100%
voicevox_engine/dev/synthesis_engine/mock.py 36 2 coverage-94%
voicevox_engine/engine_manifest/EngineManifest.py 34 0 coverage-100%
voicevox_engine/engine_manifest/EngineManifestLoader.py 12 0 coverage-100%
voicevox_engine/engine_manifest/init.py 3 0 coverage-100%
voicevox_engine/full_context_label.py 162 3 coverage-98%
voicevox_engine/kana_parser.py 86 1 coverage-99%
voicevox_engine/library_manager.py 93 5 coverage-95%
voicevox_engine/metas/Metas.py 33 0 coverage-100%
voicevox_engine/metas/MetasStore.py 29 12 coverage-59%
voicevox_engine/metas/init.py 2 0 coverage-100%
voicevox_engine/model.py 162 9 coverage-94%
voicevox_engine/mora_list.py 4 0 coverage-100%
voicevox_engine/morphing.py 70 46 coverage-34%
voicevox_engine/part_of_speech_data.py 5 0 coverage-100%
voicevox_engine/preset/Preset.py 12 0 coverage-100%
voicevox_engine/preset/PresetError.py 2 0 coverage-100%
voicevox_engine/preset/PresetManager.py 81 2 coverage-98%
voicevox_engine/preset/init.py 4 0 coverage-100%
voicevox_engine/setting/Setting.py 11 0 coverage-100%
voicevox_engine/setting/SettingLoader.py 19 0 coverage-100%
voicevox_engine/setting/init.py 3 0 coverage-100%
voicevox_engine/synthesis_engine/init.py 5 0 coverage-100%
voicevox_engine/synthesis_engine/core_wrapper.py 201 146 coverage-27%
voicevox_engine/synthesis_engine/make_synthesis_engines.py 59 30 coverage-49%
voicevox_engine/synthesis_engine/synthesis_engine.py 128 13 coverage-90%
voicevox_engine/synthesis_engine/synthesis_engine_base.py 67 9 coverage-87%
voicevox_engine/user_dict.py 144 12 coverage-92%
voicevox_engine/utility/init.py 5 0 coverage-100%
voicevox_engine/utility/connect_base64_waves.py 37 0 coverage-100%
voicevox_engine/utility/core_version_utility.py 8 1 coverage-88%
voicevox_engine/utility/mutex_utility.py 10 0 coverage-100%
voicevox_engine/utility/path_utility.py 26 8 coverage-69%
TOTAL 2179 708 coverage-68%

@tarepan tarepan changed the title Add: SynthesisEngine Core情報都度取得 追加: SynthesisEngine Core情報都度取得 Dec 2, 2023
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.

なるほどです、キャッシュせず毎回ロードする形ですね!
確かにloadedとかはコア側での管理なのに、話者情報などはエンジン側で管理しているのは不揃いに感じました。
毎回取得・dictに変更するのは計算コストが少し増しますが、全然許容範囲に思います。

コア実装に詳しい @takana-v さんや @PickledChair さん的になにか問題になりそうな点に気づいたらお聞きしたいです!

@tarepan tarepan marked this pull request as ready for review December 3, 2023 11:53
@tarepan tarepan requested a review from a team as a code owner December 3, 2023 11:53
@tarepan tarepan requested review from Hiroshiba and removed request for a team December 3, 2023 11:53
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.

Synthesisエンジン内で話者情報を保持していたのは、昔のコードの名残かと思われます。

これより以前は、SynthesisEngineクラスを作る時に引数として話者情報を渡していました。

ということで、問題ないかと思います。

Copy link
Member

@PickledChair PickledChair left a comment

Choose a reason for hiding this comment

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

特に問題はないと思いました……! SynthesisEngine がコアの情報をキャッシュしていた理由については takana さんのおっしゃる通りだと思います。また、Issue で tarepan さんが触れている通り、性能低下の懸念はあまりないと思います。適切なリファクタリングだと感じました

@Hiroshiba
Copy link
Member

お二人ともありがとうございます!!
マージさせていただこうと思います!

@Hiroshiba Hiroshiba merged commit 8042b4b into VOICEVOX:master Dec 4, 2023
3 checks passed
@tarepan tarepan deleted the refactor/coreproxy branch December 5, 2023 02:44
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.

Add: Core情報都度取得
4 participants