Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/shm11C3/voicevox into featu…
Browse files Browse the repository at this point in the history
…re/#355auto-save
  • Loading branch information
shm11C3 committed Dec 5, 2023
2 parents dff92ae + 37d52de commit 4d2afb9
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 22 deletions.
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ LGPL_LICENSEを参照してください。

2. ソースコードの公開が不要な別ライセンス

別ライセンスを取得したい場合は、ヒホ(twitter: @hiho_karuta)に求めてください。
別ライセンスを取得したい場合は、ヒホに求めてください。
X アカウント: @hiho_karuta
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ npm run test-watch:unit # 監視モード
### ブラウザ End to End テスト

Electron の機能が不要な、UI や音声合成などの End to End テストを実行します。

> **Note**
> 一部のエンジンの設定を書き換えるテストは、CI(Github Actions)上でのみ実行されるようになっています。
Expand Down Expand Up @@ -201,4 +202,5 @@ npm scripts の `serve` や `electron:serve` などの開発ビルド下では
## ライセンス

LGPL v3 と、ソースコードの公開が不要な別ライセンスのデュアルライセンスです。
別ライセンスを取得したい場合は、ヒホ(twitter: [@hiho_karuta](https://twitter.com/hiho_karuta))に求めてください。
別ライセンスを取得したい場合は、ヒホに求めてください。
X アカウント: [@hiho_karuta](https://x.com/hiho_karuta)
9 changes: 7 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,23 @@ if (isElectron) {
host: z.string(),
executionFilePath: z.string(),
executionArgs: z.array(z.string()),
executionEnabled: z.boolean(),
})
.passthrough()
.array();
const engineInfos = envSchema.parse(JSON.parse(defaultEngineInfosEnv));

engineInfos.forEach((info) => {
for (const info of engineInfos) {
if (!info.executionEnabled) {
continue;
}

additionalWebServer.push({
command: `${info.executionFilePath} ${info.executionArgs.join(" ")}`,
url: `${info.host}/version`,
reuseExistingServer: !process.env.CI,
});
});
}
} else {
throw new Error(`VITE_TARGETの指定が不正です。${process.env.VITE_TARGET}`);
}
Expand Down
10 changes: 5 additions & 5 deletions public/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## ご感想・ご要望

ぜひ Twitter にてハッシュタグ `#VOICEVOX` を付けてツイートしてください。開発の励みになります。
ぜひ X(旧 Twitter)にてハッシュタグ `#VOICEVOX` を付けてポストしてください。開発の励みになります。

## 不具合・バグ報告

以下の内容を添えてハッシュタグ `#VOICEVOX` を付けてツイートしていただくか、VOICEVOX 公式([@voicevox_pj](https://twitter.com/voicevox_pj))までご報告ください。
以下の内容を添えてハッシュタグ `#VOICEVOX` を付けてポストしていただくか、VOICEVOX 公式([@voicevox_pj](https://x.com/voicevox_pj))までご報告ください。

- 不具合の内容
- 再現手順(動画や写真があれば添付してください)
Expand All @@ -28,11 +28,11 @@

## その他

[Q&A](https://voicevox.hiroshiba.jp/qa) に掲載されていないご質問があれば VOICEVOX 公式([@voicevox_pj](https://twitter.com/voicevox_pj))にお問い合わせください。
[Q&A](https://voicevox.hiroshiba.jp/qa) に掲載されていないご質問があれば VOICEVOX 公式([@voicevox_pj](https://x.com/voicevox_pj))にお問い合わせください。

## クレジット

VOICEVOX ホームページ:[https://voicevox.hiroshiba.jp](https://voicevox.hiroshiba.jp)
Copyright ©︎ Hiroshiba Kazuyuki
VOICEVOX 公式:[@voicevox_pj](https://twitter.com/voicevox_pj)
開発者 Twitter[@hiho_karuta](https://twitter.com/hiho_karuta)
VOICEVOX 公式:[@voicevox_pj](https://x.com/voicevox_pj)
開発者:[@hiho_karuta](https://x.com/hiho_karuta)
6 changes: 3 additions & 3 deletions public/howtouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ ZIP ファイルを解凍した場合、ダウンロードした ZIP ファイ

## ご感想・ご要望・バグ報告など

ご感想・ご要望は、ぜひ Twitter にてハッシュタグ `#VOICEVOX` を付けてツイートしてください。開発の励みになります。
ご感想・ご要望は、ぜひ X(旧 Twitter)にてハッシュタグ `#VOICEVOX` を付けてポストしてください。開発の励みになります。

うまく動かない場合や不具合を見つけられた方は、Twitter にて不具合をハッシュタグ `#VOICEVOX` を付けてツイートしていただくか、VOICEVOX 公式([@voicevox_pj](https://twitter.com/voicevox_pj))までご報告ください。
うまく動かない場合や不具合を見つけられた方は、X にて不具合をハッシュタグ `#VOICEVOX` を付けてポストしていただくか、VOICEVOX 公式([@voicevox_pj](https://x.com/voicevox_pj))までご報告ください。

その他、 Q&A に掲載されていないご質問があれば VOICEVOX 公式([@voicevox_pj](https://twitter.com/voicevox_pj))にお問い合わせください。
その他、 Q&A に掲載されていないご質問があれば VOICEVOX 公式([@voicevox_pj](https://x.com/voicevox_pj))にお問い合わせください。
12 changes: 6 additions & 6 deletions public/qAndA.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ DirectML 対応の GPU を搭載した Windows PC と、Nvidia 製 GPU 搭載の
### Q. 使い方がわかりません

[使い方](https://voicevox.hiroshiba.jp/how_to_use) Web ページか、ソフトウェアのヘルプからご確認ください。
わからないところがあれば Twitter にて `#VOICEVOX` を付けてツイートすると、解決策を教えてくれる方がいらっしゃるかもしれません。
わからないところがあれば X(旧 Twitter)にて `#VOICEVOX` を付けてポストすると、解決策を教えてくれる方がいらっしゃるかもしれません。

### Q. オフラインのパソコンで使用できますか?

Expand All @@ -84,8 +84,8 @@ DirectML 対応の GPU を搭載した Windows PC と、Nvidia 製 GPU 搭載の

### Q. バグを見つけました。どこに報告すれば良いですか?

バグを見つけられた方はツイッターにてご報告いただけると助かります
VOICEVOX Twitter アカウント [@voicevox_pj](https://twitter.com/voicevox_pj)
バグを見つけられた方は X にてご報告いただけると助かります
VOICEVOX X アカウント [@voicevox_pj](https://x.com/voicevox_pj)

### Q. バージョンアップすると表示がおかしくなりました

Expand Down Expand Up @@ -218,8 +218,8 @@ VOICEVOX は、キャラクターとソフトウェアで権利者が異なり

### Q. 問い合わせ先を教えてください

ご感想・ご要望は、ぜひ Twitter にてハッシュタグ `#VOICEVOX` を付けてツイートしてください。開発の励みになります。
ご感想・ご要望は、ぜひ X(旧 Twitter)にてハッシュタグ `#VOICEVOX` を付けてポストしてください。開発の励みになります。

うまく動かない場合や不具合を見つけられた方は、Twitter にて不具合をハッシュタグ `#VOICEVOX` を付けてツイートしていただくか、VOICEVOX 公式([@voicevox_pj](https://twitter.com/voicevox_pj))までご報告ください。
うまく動かない場合や不具合を見つけられた方は、X にて不具合をハッシュタグ `#VOICEVOX` を付けてポストしていただくか、VOICEVOX 公式([@voicevox_pj](https://x.com/voicevox_pj))までご報告ください。

その他、 Q&A に掲載されていないご質問があれば VOICEVOX 公式([@voicevox_pj](https://twitter.com/voicevox_pj))にお問い合わせください。
その他、 Q&A に掲載されていないご質問があれば VOICEVOX 公式([@voicevox_pj](https://x.com/voicevox_pj))にお問い合わせください。
1 change: 1 addition & 0 deletions src/components/AudioCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@keydown.prevent.up="moveUpCell"
@keydown.prevent.down="moveDownCell"
@focus="onRootFocus"
@click.stop=""
>
<!-- 複数選択用のヒットボックス -->
<!-- テキスト欄の範囲選択との競合を防ぐため、activeの時はCtrlでしか出現しないようにする。 -->
Expand Down
20 changes: 16 additions & 4 deletions src/views/EditorHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
dragEventCounter = 0;
loadDraggedFile($event);
"
@click="onAudioCellPaneClick"
>
<draggable
ref="cellsRef"
Expand Down Expand Up @@ -241,7 +242,7 @@ const hotkeyMap = new Map<HotkeyAction, () => HotkeyReturnType>([
[
"テキスト欄にフォーカスを戻す",
() => {
if (activeAudioKey.value !== undefined) {
if (activeAudioKey.value != undefined) {
focusCell({ audioKey: activeAudioKey.value, focusTarget: "textField" });
}
return false; // this is the same with event.preventDefault()
Expand Down Expand Up @@ -405,7 +406,7 @@ const addAudioItem = async () => {
let presetKey: PresetKey | undefined = undefined;
let baseAudioItem: AudioItem | undefined = undefined;
if (prevAudioKey !== undefined) {
if (prevAudioKey != undefined) {
voice = store.state.audioItems[prevAudioKey].voice;
presetKey = store.state.audioItems[prevAudioKey].presetKey;
baseAudioItem = store.state.audioItems[prevAudioKey];
Expand Down Expand Up @@ -655,7 +656,7 @@ const allEngineState = computed(() => {
// 登録されているすべてのエンジンについて状態を確認する
for (const engineId of store.state.engineIds) {
const engineState: EngineState | undefined = engineStates[engineId];
if (engineState === undefined)
if (engineState == undefined)
throw new Error(`No such engineState set: engineId == ${engineId}`);
// FIXME: 1つでも接続テストに成功していないエンジンがあれば、暫定的に起動中とする
Expand All @@ -672,7 +673,7 @@ const allEngineState = computed(() => {
const isEngineWaitingLong = ref<boolean>(false);
let engineTimer: number | undefined = undefined;
watch(allEngineState, (newEngineState) => {
if (engineTimer !== undefined) {
if (engineTimer != undefined) {
clearTimeout(engineTimer);
engineTimer = undefined;
}
Expand Down Expand Up @@ -879,6 +880,17 @@ watch(activeAudioKey, (audioKey) => {
const showAddAudioItemButton = computed(() => {
return store.state.showAddAudioItemButton;
});
const onAudioCellPaneClick = () => {
if (
store.state.experimentalSetting.enableMultiSelect &&
activeAudioKey.value
) {
store.dispatch("SET_SELECTED_AUDIO_KEYS", {
audioKeys: [activeAudioKey.value],
});
}
};
</script>

<style scoped lang="scss">
Expand Down
32 changes: 32 additions & 0 deletions tests/e2e/browser/複数選択/選択.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,35 @@ test("複数選択:キーボード", async ({ page }) => {
expect(selectedStatus.active).toBe(3);
expect(selectedStatus.selected).toEqual([3]);
});

test("複数選択:台本欄の余白クリックで解除", async ({ page }) => {
let selectedStatus: SelectedStatus;

await page.locator(".audio-cell:nth-child(2)").click();
await page.keyboard.down("Shift");
await page.locator(".audio-cell:nth-child(4)").click();
await page.keyboard.up("Shift");

// 念のため確認
await page.waitForTimeout(100);
selectedStatus = await getSelectedStatus(page);
expect(selectedStatus.active).toBe(4);
expect(selectedStatus.selected).toEqual([2, 3, 4]);

const scriptArea = page.locator(".audio-cell-pane");
const boundingBox = await scriptArea.boundingBox();
if (!boundingBox) {
throw new Error("No bounding box");
}
await scriptArea.click({
position: {
x: 10,
y: boundingBox.height - 10,
},
});

await page.waitForTimeout(100);
selectedStatus = await getSelectedStatus(page);
expect(selectedStatus.active).toBe(4);
expect(selectedStatus.selected).toEqual([4]);
});

0 comments on commit 4d2afb9

Please sign in to comment.