Skip to content

Commit de6b215

Browse files
committed
Update: API から AIVMX ファイルのサイズを取得できるようにする
1 parent caa7632 commit de6b215

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

voicevox_engine/aivm_manager.py

+2
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ def get_installed_aivm_infos(
332332
latest_version=aivm_manifest.version, # 初期値として AIVM マニフェスト記載のバージョンを設定
333333
# AIVMX ファイルのインストール先パス
334334
file_path=aivm_file_path,
335+
# AIVMX ファイルのインストールサイズ (バイト単位)
336+
file_size=aivm_file_path.stat().st_size,
335337
# AIVM マニフェスト
336338
manifest=aivm_manifest,
337339
# 話者情報は後で追加するため、空リストを渡す

voicevox_engine/model.py

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class AivmInfo(BaseModel):
108108
title="この音声合成モデルの AivisHub で公開されている最新バージョン (AivisHub で公開されていない場合は AIVM マニフェスト記載のバージョン)"
109109
)
110110
file_path: Path = Field(title="AIVMX ファイルのインストール先パス")
111+
file_size: int = Field(title="AIVMX ファイルのインストールサイズ (バイト単位)")
111112
manifest: AivmManifest = Field(title="AIVM マニフェスト")
112113
speakers: list[LibrarySpeaker] = Field(
113114
title="話者情報のリスト (VOICEVOX ENGINE 互換)"

0 commit comments

Comments
 (0)