Skip to content

Commit

Permalink
Merge branch 'master' of github.com:VOICEVOX/voicevox_engine
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukumijima committed Aug 20, 2024
2 parents 4b132fe + 3c247dc commit 7bdefb4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-engine-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
done
# Rename to artifact.vvpp if there are only artifact.001.vvppp
if [ "$(find ${{ steps.vars.outputs.package_name }}.*.vvppp -maxdepth 1 | wc -l)" == 1 ]; then
if [ "$(find ${{ steps.vars.outputs.package_name }}.*.vvppp -maxdepth 1 | wc -l)" -eq 1 ]; then
mv ${{ steps.vars.outputs.package_name }}.001.vvppp ${{ steps.vars.outputs.package_name }}.vvpp
fi
Expand Down
42 changes: 42 additions & 0 deletions test/e2e/test_sing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"""
歌唱のテスト
"""

from test.utility import hash_wave_floats_from_wav_bytes

from fastapi.testclient import TestClient
from syrupy.assertion import SnapshotAssertion


def test_スコアとキャラクターIDから音声を合成できる(
client: TestClient, snapshot: SnapshotAssertion
) -> None:
# スコアとキャラクター ID から FrameAudioQuery を生成する
score = {
"notes": [
{"key": None, "frame_length": 10, "lyric": ""},
{"key": 30, "frame_length": 3, "lyric": "て"},
{"key": 30, "frame_length": 3, "lyric": "す"},
{"key": 40, "frame_length": 1, "lyric": "と"},
{"key": None, "frame_length": 10, "lyric": ""},
]
}
frame_audio_query_res = client.post(
"/sing_frame_audio_query", params={"speaker": 0}, json=score
)
# AivisSpeech Engine では未実装 (501 Not Implemented を返す)
assert frame_audio_query_res.status_code == 501
return
frame_audio_query = frame_audio_query_res.json()

# FrameAudioQuery から音声波形を生成する
frame_synthesis_res = client.post(
"/frame_synthesis", params={"speaker": 0}, json=frame_audio_query
)

# リクエストが成功している
assert frame_synthesis_res.status_code == 200

# FileResponse 内の .wav から抽出された音声波形が一致する
assert frame_synthesis_res.headers["content-type"] == "audio/wav"
assert snapshot == hash_wave_floats_from_wav_bytes(frame_synthesis_res.read())

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/codesign.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ target_file_glob="$1"
# eSignerCKAのセットアップ
INSTALL_DIR='..\eSignerCKA'
if [ ! -d "$INSTALL_DIR" ]; then
curl -LO "https://github.com/SSLcom/eSignerCKA/releases/download/v1.0.6/SSL.COM-eSigner-CKA_1.0.6.zip"
curl -LO --retry 3 --retry-delay 5 "https://github.com/SSLcom/eSignerCKA/releases/download/v1.0.6/SSL.COM-eSigner-CKA_1.0.6.zip"
unzip -o SSL.COM-eSigner-CKA_1.0.6.zip
mv ./*eSigner*CKA_*.exe eSigner_CKA_Installer.exe
powershell "
Expand Down

0 comments on commit 7bdefb4

Please sign in to comment.