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

refactor: リソースディレクトリを新設 #1243

Open
4 of 5 tasks
tarepan opened this issue May 14, 2024 · 3 comments · May be fixed by #1323
Open
4 of 5 tasks

refactor: リソースディレクトリを新設 #1243

tarepan opened this issue May 14, 2024 · 3 comments · May be fixed by #1323
Assignees
Labels
機能向上 状態:実装 実装をおこなっている状態

Comments

@tarepan
Copy link
Contributor

tarepan commented May 14, 2024

内容

概要: リソースディレクトリを新設してリファクタリング

現在の VOICEVOX ENGINE は複数のリソースファイル・ディレクトリをルートに置いている。以下はその一覧である:

  • engine_manifest_assets/
  • speaker_info/
  • ui_template/
  • default.csv
  • presets.yaml

その結果、ビルド時にこれらのファイルを逐一指定して移動・登録する必要が出てきている。
また初学者のリポジトリ見通しの観点からもルートはセマンティックに整理されている方が好ましい。

これらのリソースは「静的かつ情報源である」という特性を共有しているため、resources として抽象化できる。
resources/ ディレクトリ下に各リソースを収納すれば、resources/ のみの指定で移動・登録が可能であり、初学者もその意味を一見して理解できる。  

このような背景から、resources/ 新設によるリファクタリングを提案します。

Pros 良くなる点

  • ビルドコマンド削減
  • ビルド誤設定リスク低減
  • ルート簡略化による見通し改善

Cons 悪くなる点

無し

実現方法

  • resources ディレクトリの新設
  • 各リソースの移動
  • リソースパスの修正

VOICEVOXのバージョン

0.19.1

その他

Go/NoGo 判断の一助として一部のリソースを resources/ 下へ移す draft PR を作成しました(#1244, #1247, #1251)。必要であればご活用ください。

@tarepan tarepan added 機能向上 要議論 実行する前に議論が必要そうなもの 状態:必要性議論 必要性を議論している状態 labels May 14, 2024
@sabonerune
Copy link
Contributor

--voicevox_dirによって変更可能なspeaker_infoリソースの処理については注意が必要だと思います。
特にPyInstaller v6(mac環境で問題が発生したためv5に戻した)では実行ファイルのディレクトリと_internalディレクトリに分かれることに注意です。

@Hiroshiba
Copy link
Member

良いと思います!!
ルートディレクトリは積極的に整理していきたいですねぇ。

@sabonerune さんの仰るとおり注意点はあるけど、破壊的な変更は無い・・・はず!

見落としやダメなフォルダ・ファイルがあるか確認しましたが、挙げられている5つで必要十分だと感じました!

@tarepan
Copy link
Contributor Author

tarepan commented May 17, 2024

着手します。

@tarepan tarepan added 状態:実装 実装をおこなっている状態 and removed 要議論 実行する前に議論が必要そうなもの 状態:必要性議論 必要性を議論している状態 labels May 17, 2024
@tarepan tarepan self-assigned this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
機能向上 状態:実装 実装をおこなっている状態
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants