Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
793f9f9
ci: `build-{windows,unix}-cpp-example`を`build-and-test-…`に
qryxip Jun 16, 2025
2c4d3ef
Fix `cp`
qryxip Jun 16, 2025
154b9c4
Fix the path to simple_tts.exe
qryxip Jun 16, 2025
bf969ec
`cd`
qryxip Jun 17, 2025
f1d247c
Rename libonnxruntime
qryxip Jun 17, 2025
ce0d6fb
`esac`
qryxip Jun 17, 2025
fe70a5a
Revert "`esac`"
qryxip Jun 17, 2025
437d118
Revert "Rename libonnxruntime"
qryxip Jun 17, 2025
cb5225b
target下にあるlibonnxruntimeを使う
qryxip Jun 17, 2025
55c273d
`mkdir`
qryxip Jun 17, 2025
9daee16
onnxruntimeはvoicevox_onnxruntimeにリネーム
qryxip Jun 17, 2025
f24758b
Fix `rename`
qryxip Jun 17, 2025
2ecda8d
Prevent from renaming parent directories
qryxip Jun 17, 2025
071c89f
壊れたvoicevox_onnxruntime.dllを置いてみる
qryxip Jun 18, 2025
3e051b2
Revert "壊れたvoicevox_onnxruntime.dllを置いてみる"
qryxip Jun 18, 2025
ab91ab0
一番怪しそうな`PlaySound`を止める
qryxip Jun 18, 2025
18acf1a
Revert "一番怪しそうな`PlaySound`を止める"
qryxip Jun 18, 2025
6e93403
sample.vvmを破損させてみる
qryxip Jun 18, 2025
da5da22
Revert "sample.vvmを破損させてみる"
qryxip Jun 19, 2025
ebcb91b
`voicevox_synthesizer_new`は終わっているのか?
qryxip Jun 19, 2025
2cbdb43
VVMのイテレートはできているのか?
qryxip Jun 19, 2025
54b23c5
`GetModelDir()`は?
qryxip Jun 20, 2025
2244119
イテレータを作る前は?
qryxip Jun 20, 2025
14599db
`std::filesystem::path`に明示的に変換した場合は?
qryxip Jun 20, 2025
461312c
VVMのディレクトリを修正
qryxip Jun 20, 2025
2c25d9e
`git restore -s main -- example/cpp/windows/simple_tts/simple_tts.cpp`
qryxip Jun 20, 2025
205390d
WindowsでもWAVのチェックをする
qryxip Jun 20, 2025
dd87bf2
`iconv`でUTf-16LEにして流し込んでみる
qryxip Jun 20, 2025
4924690
`-f UTF-8`
qryxip Jun 20, 2025
b3e828c
入力を出す。あとspeech.wavはできているのか?
qryxip Jun 20, 2025
659edc1
`std::string`で出す
qryxip Jun 20, 2025
abbfa06
wavの場所はそこじゃなかった
qryxip Jun 20, 2025
39dbad8
Rust側で`dbg!`
qryxip Jun 20, 2025
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
51 changes: 41 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ jobs:
cargo xtask update-c-header --verify
git diff

# TODO: "build-and-test-…"にする
build-unix-cpp-example:
build-and-test-unix-cpp-example:
strategy:
fail-fast: false
matrix:
Expand All @@ -194,38 +193,57 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Aristotle Pagaltzis's `rename(1)`
if: runner.os == 'macOS'
run: brew install rename
- name: Install Aristotle Pagaltzis's `rename(1)`
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y rename
- name: Set up Rust
uses: ./.github/actions/rust-toolchain-from-file
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: build voicevox_core_c_api
run: cargo build -p voicevox_core_c_api --features load-onnxruntime -v
- name: run test_util's build script
run: cargo check -vp test_util # build scriptにより/crates/test_util/data/の生成
- name: 必要なfileをunix用exampleのディレクトリに移動させる
run: |
mkdir -p example/cpp/unix/voicevox_core/c_api/{include,lib}
if [ "$RUNNER_OS" = Linux ]; then
alias prename=rename
fi
mkdir -p example/cpp/unix/voicevox_core/{c_api/{include,lib},dict,models,onnxruntime}
sed 's:^//\(#define VOICEVOX_LOAD_ONNXRUNTIME\)$:\1:' \
crates/voicevox_core_c_api/include/voicevox_core.h \
> example/cpp/unix/voicevox_core/c_api/include/voicevox_core.h
cp -v target/debug/libvoicevox_core.{so,dylib} example/cpp/unix/voicevox_core/c_api/lib/ || true
# FIXME: ↓この二つ要らないのでは?
cp -v target/debug/libonnxruntime.so.* example/cpp/unix/voicevox_core/ || true
cp -v target/debug/libonnxruntime.*.dylib example/cpp/unix/voicevox_core/ || true
cp -v target/debug/libonnxruntime.so.* example/cpp/unix/voicevox_core/onnxruntime/lib/ || true
cp -v target/debug/libonnxruntime.*.dylib example/cpp/unix/voicevox_core/onnxruntime/lib/ || true
cp -vr crates/test_util/data/lib example/cpp/unix/voicevox_core/onnxruntime/
rename -v s/libonnxruntime/libvoicevox_onnxruntime/ example/cpp/unix/voicevox_core/onnxruntime/lib/*
cp -vr crates/test_util/data/model example/cpp/unix/voicevox_core/models/vvms
cp -vr crates/test_util/data/open_jtalk_dic_utf_8-1.11 example/cpp/unix/voicevox_core/dict/

- if: startsWith(matrix.os, 'mac')
uses: jwlawson/actions-setup-cmake@v2
- name: Install build dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y cmake
- name: Build
run: |
cd example/cpp/unix
cmake -S . -B build
cmake --build build
- name: Run
run: |
cd example/cpp/unix
./build/simple_tts この音声は、ボイスボックスを使用して、出力されています。
[ "$(file audio.wav)" = 'audio.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 24000 Hz' ]

# TODO: "build-and-test-…"にする
build-windows-cpp-example:
build-and-test-windows-cpp-example:
strategy:
fail-fast: false
runs-on: windows-latest
Expand All @@ -246,14 +264,20 @@ jobs:
uses: taiki-e/install-action@cargo-binstall
- name: build voicevox_core_c_api
run: cargo build -p voicevox_core_c_api --features load-onnxruntime -v
- name: run test_util's build script
run: cargo check -vp test_util # build scriptにより/crates/test_util/data/の生成
- name: 必要なfileをexampleのディレクトリに移動させる
shell: bash
run: |
mkdir -p example/cpp/windows/simple_tts/lib/x64
mkdir -p example/cpp/windows/simple_tts/{bin/x64/Debug/models,lib/x64}
sed 's:^//\(#define VOICEVOX_LOAD_ONNXRUNTIME\)$:\1:' \
crates/voicevox_core_c_api/include/voicevox_core.h \
> example/cpp/windows/simple_tts/voicevox_core.h
cp target/debug/voicevox_core.dll.lib example/cpp/windows/simple_tts/lib/x64/voicevox_core.lib
cp target/debug/voicevox_core.dll example/cpp/windows/simple_tts/bin/x64/Debug/
cp crates/test_util/data/lib/onnxruntime.dll example/cpp/windows/simple_tts/bin/x64/Debug/voicevox_onnxruntime.dll
cp -r crates/test_util/data/model example/cpp/windows/simple_tts/bin/x64/Debug/models/vvms
cp -r crates/test_util/data/open_jtalk_dic_utf_8-1.11 example/cpp/windows/simple_tts/bin/x64/Debug/

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
Expand All @@ -264,6 +288,13 @@ jobs:
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Run
shell: bash
run: |
cd example/cpp/windows/simple_tts/bin/x64/Debug
<<< この音声は、ボイスボックスを使用して、出力されています。 iconv -f UTF-8 -t UTF-16LE | ./simple_tts.exe
file speech.wav
[ "$(file speech.wav)" = 'speech.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 24000 Hz' ]

build-and-test-python-api:
strategy:
Expand Down
1 change: 1 addition & 0 deletions crates/voicevox_core/src/synthesizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,7 @@ pub(crate) mod blocking {
/// [音声の調整]: ../index.html#音声の調整
#[cfg_attr(doc, doc(alias = "voicevox_synthesizer_tts"))]
pub fn tts<'a>(&'a self, text: &'a str, style_id: StyleId) -> Tts<'a, T> {
dbg!(text);
Tts {
synthesizer: &self.0,
text,
Expand Down
Loading