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

ENH: モーフィングUIの実装 #1030

Merged
merged 15 commits into from
Jan 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions src/store/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,8 @@ export const audioStore = createPartialStore<AudioStoreTypes>({
},

VALID_MOPHING_INFO: {
getter: (state, getters) => (audioItem: AudioItem) => {
getter: (_, getters) => (audioItem: AudioItem) => {
if (
!state.experimentalSetting.enableMorphing ||
Copy link
Contributor Author

Choose a reason for hiding this comment

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

VALID_MOPHING_INFOの判定からモーフィングの設定を外しました。

audioItem.morphingInfo == undefined ||
audioItem.engineId == undefined
)
Expand Down Expand Up @@ -1092,30 +1091,29 @@ export const audioStore = createPartialStore<AudioStoreTypes>({
if (audioQuery == undefined || speaker == undefined) {
return null;
}
const engineAudioQuery = convertAudioQueryFromEditorToEngine(
audioQuery,
state.engineManifests[engineId].defaultSamplingRate
);

return dispatch("INSTANTIATE_ENGINE_CONNECTOR", {
engineId,
})
.then((instance) => {
if (
audioItem.morphingInfo != undefined &&
state.experimentalSetting.enableMorphing &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

モーフィングの設定は音声合成時に確認します

getters.VALID_MOPHING_INFO(audioItem)
) {
return instance.invoke("synthesisMorphingSynthesisMorphingPost")({
audioQuery: convertAudioQueryFromEditorToEngine(
audioQuery,
state.engineManifests[engineId].defaultSamplingRate
),
audioQuery: engineAudioQuery,
baseSpeaker: speaker,
targetSpeaker: audioItem.morphingInfo.targetStyleId,
morphRate: audioItem.morphingInfo.rate,
});
}
return instance.invoke("synthesisSynthesisPost")({
audioQuery: convertAudioQueryFromEditorToEngine(
audioQuery,
state.engineManifests[engineId].defaultSamplingRate
),
audioQuery: engineAudioQuery,
speaker,
enableInterrogativeUpspeak:
state.experimentalSetting.enableInterrogativeUpspeak,
Expand Down