-
Notifications
You must be signed in to change notification settings - Fork 309
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
複数エンジン対応: すべてのエンジンからキャラクター情報を取得する #743
Closed
Closed
Changes from all commits
Commits
Show all changes
107 commits
Select commit
Hold shift + click to select a range
a135eff
add runEngineAll
aoirint f81a774
fix log
aoirint 22e0168
fix log
aoirint c5202dd
add killEngineAll
aoirint 6e46ad9
fix log
aoirint 31bfe9f
fix log
aoirint eb919bd
add restartEngineAll
aoirint 39b81df
call killEngineAll
aoirint c8a7c22
fix log unit
aoirint 9778831
npm run fmt
aoirint 7d7b41c
add START_WAITING_ENGINE_ALL, RESTART_ENGINE_ALL
aoirint e0198fe
npm run fmt
aoirint 5f33a07
DETECTED_ENGINE_ERROR engineKey
aoirint e23e9fb
npm run fmt
aoirint 9d593e0
fix check all ready logic
aoirint 4f0c2ee
fix engineState
aoirint c9a2272
fix test
aoirint 23bdd06
type with undefined
aoirint 8272997
fix allEngineState logic
aoirint 63c5816
fix test
aoirint 4754d9f
add comment
aoirint f3777c8
multiple engine: SET_CHARACTER_INFOS, USER_ORDERED_CHARACTER_INFOS
aoirint 67591d6
multiple engine: LOAD_CHARACTER_ALL
aoirint a97a3c6
fix buildFileName logic
aoirint d0bad7b
fix default style id
aoirint 9b3defa
fix characterInfos from vue
aoirint 579f08b
pass engineInfos to vue
aoirint d963590
fix log
aoirint b1c6fda
fix changeStyleId
aoirint 7333e5a
fix synthesis to use engineKey/Id
aoirint 825a0fb
fix character portrait to use engineId
aoirint 2f35f0a
fix audiocell icon to use engineId
aoirint b76e2b8
fix character voice testplay
aoirint f7c8746
wip fix voicesample
aoirint a02fd17
fix test
aoirint 46c1228
use <0.12 for project migration
aoirint e21c23e
Merge remote-tracking branch 'origin/main' into patch-multiple-engine…
aoirint cc83cd9
use semver for migration
aoirint 2102710
assume to be killed
aoirint c24c7e4
add memo comment
aoirint 5c1cf7c
fix comment
aoirint 086bd30
call onAllKilled after final process kill errored
aoirint 9399dd1
fix log
aoirint db81c2b
fix log
aoirint 26e4b2d
Merge remote-tracking branch 'origin/main' into patch-multiple-engine…
aoirint b681ec4
fix infinite loop when using external engine
aoirint abe3453
Merge branch 'patch-multiple-engine-process-container' into patch-mul…
aoirint 5aa3eef
Merge remote-tracking branch 'upstream/main' into patch-multiple-engi…
aoirint cb968e6
Merge branch 'patch-multiple-engine-process-container' into patch-mul…
aoirint 334f77f
Merge remote-tracking branch 'upstream/main' into patch-multiple-engi…
aoirint 19aca50
add logs
aoirint d33a330
call IS_ENGINE_READY from IS_ALL_ENGINE_READY
aoirint 858f650
fix comment
aoirint 521252e
call IS_ENGINE_READY with 0th engineKey
aoirint 88d9fc9
fixme to todo
aoirint a75322e
fix comment
aoirint f5204a7
Merge branch 'patch-multiple-engine-start-waiting-engine-all' into pa…
aoirint a6f1922
assert engineKey, engineId, styleId is not undefined
aoirint 110a762
fix comment
aoirint 2c754de
Merge branch 'patch-multiple-engine-start-waiting-engine-all' into pa…
aoirint da2e26d
remove unused import
aoirint 6d30f34
Merge branch 'patch-multiple-engine-api-log' into patch-multiple-engi…
aoirint af19eae
fix CharacterOrderDialog
aoirint a719ae5
CharacterOrderDialog: change icon based on selected style
aoirint 7175447
remove .value in template
aoirint 7cac6e5
DefaultStyleSelectDialog: multiple engine (allow duplicated styleId)
aoirint 8319276
LibraryPolicy: multiple engine
aoirint bf31b88
fix log
aoirint 4453c8e
Merge branch 'patch-multiple-engine-start-waiting-engine-all' into pa…
aoirint 222792d
CharacterOrderDialog: allow duplication of styleId when speakerUuid i…
aoirint 695ef6f
Merge branch 'patch-multiple-engine-character-order-dialog' into patc…
aoirint 8261eb6
fix comment
aoirint a240b63
Merge branch 'patch-multiple-engine-start-waiting-engine-all' into pa…
aoirint 8c2b543
split icon change pr
aoirint ac6310b
fix comment
aoirint 09332c1
state.engineInfos to Record<string, EngineInfo> from EngineInfo[]
aoirint 5d0ee83
Merge remote-tracking branch 'upstream/main' into patch-multiple-engi…
aoirint 7031f3d
fix dictionary actions to use state.engineKeys instead of engineInfos
aoirint c37757c
npm run fmt
aoirint f7e2bdf
initialize engineStates with STARTING
aoirint a075309
npm run fmt
aoirint 8c24a7e
GENERATE_AUDIO_ITEM: add engineKey undefined check
aoirint 966f013
use strict equality for engineKey undefined check
aoirint f86a7d5
add comment to describe loop behavior
aoirint 4e745d5
add STARTING assert test
aoirint b152e36
remove unneeded undefined check
aoirint 1d15f02
Merge remote-tracking branch 'upstream/main' into patch-multiple-engi…
aoirint d4db483
Merge branch 'patch-multiple-engine-start-waiting-engine-all' into pa…
aoirint 56063cb
DictionaryManageDialog: temporarily use first engineKey
aoirint 51f19f1
Merge branch 'patch-multiple-engine-character-order-dialog' into patc…
aoirint 571d980
flatMap engineInfos -> engineKeys
aoirint d610af5
loop engineInfos -> engineKeys
aoirint 8d6e974
add characterInfos assert.isObject
aoirint d30dfbb
Merge remote-tracking branch 'origin/main' into patch-multiple-engine…
aoirint 2fa8690
fix DictionaryManageDialog working for first engine
aoirint c0af3b5
Merge remote-tracking branch 'origin/patch-multiple-engine-api' into …
aoirint 7e5e1e1
SETUP_ENGINE_SPEAKER: add engineKey (fix character init)
aoirint b7759cd
fix assertion compare
aoirint f137521
fix assert message
aoirint 4afe467
project migration version 0.12 -> 0.13
aoirint 0a34c0d
add comment
aoirint a0a812a
LOAD_USER_DICT: add engineKey
aoirint 70c863c
getFlattenCharacterInfos func
aoirint 2c4bed5
GENERATE_AUDIO_ITEM: (engineId, styleId) assertion
aoirint 34fc2dc
fix message
aoirint 7747878
add comment
aoirint bf28087
Merge remote-tracking branch 'origin/main' into patch-multiple-engine…
aoirint File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
たしかにengineKeyとengineIdの使い分けがなかなか難しそうな気がしました!
ちょっと何度も聞いてしまっていて申し訳ないのですが、どういう使い分けが想定されていたんでしたっけ・・・🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
engineIdは、エンジンの種類(VOICEVOX ENGINEやCOEIROINK ENGINE)に対して、エンジンの提供者が割り振るIDです。バージョンが変わっても同じIDを使うことを想定しています。
engineKeyは、エディタに登録されたエンジンの登録項目(ユーザ登録エンジン1、ユーザ登録エンジン2のような)に対して、エディタが自動的に割り振るIDです。
例えば、以下を区別するためのものです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ただ製品版VOICEVOX(エディタとエンジンが同梱配布)では、エディタ初回実行時にengineKeyを決定するような仕組みを入れるのは複雑かなと思ったので、配布時に既に割り振られている(.env.productionに記述されている)形を想定しています(
DEFAULT_ENGINE_INFOS
では決め打ちの値ということ)。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VOICEVOX 0.12.3では、キャラクター+スタイルの情報は、AudioCellがstyleIdとして持っています。
AudioCellの内容はプロジェクトファイルに保存されます。
複数エンジン対応後、キャラクター+スタイルを一意に識別するには、少なくとも(engineId, styleId)または(speakerUuid, styleId)が必要です(エンジンバージョンによる違いは無視)。
#609 (comment) で(engineId, styleId)がよさそうということだったと思うので、このPRではAudioCell(プロジェクトファイル)が(engineId, styleId)をもつように変更しています。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
engineKeyからengineIdを引く処理、またはengineIdからengineKeyを引く処理が必要になっていて、この変換が挟まること、どの関数でどちらを受け取るべきなのかを決めること、が複雑(わかりにくい)と思っています。
このPRでは、実装を簡単にするために
engineKey == engineId
を想定していて、このロジックが分散しないようにgetEngineIdByEngineKey
、getDefaultEngineKeyByEngineId
で共通化しています(インタフェースは暫定的なものです)。例えば、エンジン設定UIでengineIdに対するデフォルトのengineKeyを設定できるようにして、それを
getDefaultEngineKeyByEngineId
が返すことで、シンプルなエンジン切り替え(バージョン切り替え)の仕組みが作れると思っています(いろいろな初期化が必要そうなので再起動を促すと楽そう)。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます!!非常によくわかりました!!!
AudioCellでengineIdを使うのは、現行と同じ挙動になって、少なくとも使い勝手が悪くなることは無く、かつ実装もそこそこシンプルなので、やっぱり良い方法だと感じました。
将来的にはAudioCell(よいうよりAudioInfo)にengineKeyも保存する形を目指す感じになる感じでしょうか。
(過去バージョンのエンジンと今のエンジンを統一的に使えるように)
engineIdとengineKeyを分けたいのは賛成なのですが、今は同一に扱っているため、潜在的なバグに気づきにくく、かつ実装方針もなかなか定まりにくいのかなと感じています。
もうAudioInfoにengineKeyも持たせちゃうのはどうでしょう 👀
getDefaultEngineKeyByEngineId
とgetEngineIdByEngineKey
を用意するのは賛成です!でももしかしたら
getDefaultEngineKeyByEngineId
とgetEngineIdByEngineKey
を呼ぶべき機会はとても少なくて、前者は「AudioInfoにあるengineKeyがengineInfosにないので仕方なくデフォルトのを使うとき」のみ、
後者は「AudioInfoに登録するためにengineIdを得るとき」のみにできるのかなと思っています。
なんか見落としや気づいてない点がありそうなので、ご指摘頂けると。。。🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
もしくは、engineId周りを一旦コードから外しちゃうというのはどうでしょう 👀
一旦外すことを提案している理由はもう2つあります。
理由の1つは、上述のような、engineIdをどう扱うか・どう実装するかの議論が発生してしまうためです。
結構大きな変更コード量なので、差分を明確にしたいという気持ちがあります。
もう1つの理由は、このプルリクエストが、エディタ側の複数エンジン対応に必須な最後のコードだからです。
この最後のキャラクター統合さえ完了すれば、他のコードを一気に組み込んで行けるため、ぜひ早く取り込みたいという気持ちがあります・・・!!!
もしよければ・・・!!