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

C APIの改善を行う #217

Merged
merged 31 commits into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0429477
C APIの改善を行う
qwerty2501 Aug 6, 2022
fce9290
Merge branch 'main' of https://github.com/VOICEVOX/voicevox_core into…
qwerty2501 Aug 19, 2022
60bc086
C API定義を修正した
qwerty2501 Aug 20, 2022
af7a3fe
voicevox_core側の実装も変更した
qwerty2501 Aug 20, 2022
466fdd9
cpu_num_threadsをu16に変更した
qwerty2501 Aug 21, 2022
b5635cf
helper関数を分離した
qwerty2501 Aug 21, 2022
43e2c51
SynthesisOptionsは不要そうだったので削除
qwerty2501 Aug 21, 2022
b5cd93e
SynthesisOptionsを追加
qwerty2501 Aug 21, 2022
2ece206
decode_forward -> decodeに変更した
qwerty2501 Aug 21, 2022
3a80b7e
yukarin_sa_forward -> predict_intonation に変更した
qwerty2501 Aug 21, 2022
e3a3469
yukarin_s_forward -> predict_durationに変更
qwerty2501 Aug 21, 2022
317d432
とりあえずコンパイル・テストが通るようにした
qwerty2501 Aug 22, 2022
911fdd6
clippyのエラーを修正した
qwerty2501 Aug 22, 2022
0a5db30
内部のyukarin_s,yukarin_saについて名前を修正
qwerty2501 Aug 22, 2022
5fe6665
decode_forwardとなっていたところをdecodeに修正した
qwerty2501 Aug 22, 2022
b625954
unixのテストが通るように修正
qwerty2501 Aug 22, 2022
01d6eca
API定義とそこまで関係ない実装はhelperに移動させた
qwerty2501 Aug 22, 2022
7f04348
VoicevoxInitializeOptionsをコメントを元に修正した
qwerty2501 Aug 22, 2022
d92c0e4
TtsOptionsの変換をFrom traitで行うようにした
qwerty2501 Aug 22, 2022
5892187
疑問文モードを実装した
qwerty2501 Aug 22, 2022
3f53f07
voicevox_default_synthesis_optionsを追加、enable_interrogative_upspeakがデフ…
qwerty2501 Aug 22, 2022
a489c4a
Merge branch 'main' of https://github.com/VOICEVOX/voicevox_core into…
qwerty2501 Aug 22, 2022
3e1136f
kanaは defaultとするようにした
qwerty2501 Aug 22, 2022
f697e09
use_gpu -> AccelerationModeに変更した
qwerty2501 Aug 23, 2022
07bc35b
GPU使用中かどうか判定するAPI関数を追加した
qwerty2501 Aug 23, 2022
d1e2c4b
defaultの記述を新しい形にした
qwerty2501 Aug 23, 2022
7e50250
Auto=0とした
qwerty2501 Aug 23, 2022
f6e4d9b
is_gpu_modeに名称変更
qwerty2501 Aug 25, 2022
a9c2cee
defaultオプション生成関数にmakeをつけた 
qwerty2501 Aug 25, 2022
a599e17
output_binary_size->output_wav_sizeに変更 型をc_int->usizeに変更した
qwerty2501 Aug 26, 2022
d5af118
speaker_idをu32に変更した
qwerty2501 Aug 26, 2022
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
8 changes: 4 additions & 4 deletions crates/voicevox_core/src/engine/synthesis_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl SynthesisEngine {
.collect();
let phoneme_length = self
.inference_core_mut()
.yukarin_s_forward(&phoneme_list_s, speaker_id)?;
.predict_duration(&phoneme_list_s, speaker_id)?;

let mut index = 0;
let new_accent_phrases = accent_phrases
Expand Down Expand Up @@ -250,8 +250,8 @@ impl SynthesisEngine {
end_accent_phrase_list.push(base_end_accent_phrase_list[vowel_index as usize]);
}

let mut f0_list = self.inference_core_mut().yukarin_sa_forward(
vowel_phoneme_list.len() as i64,
let mut f0_list = self.inference_core_mut().predict_intonation(
vowel_phoneme_list.len(),
&vowel_phoneme_list,
&consonant_phoneme_list,
&start_accent_list,
Expand Down Expand Up @@ -410,7 +410,7 @@ impl SynthesisEngine {
// 2次元のvectorを1次元に変換し、アドレスを連続させる
let flatten_phoneme = phoneme.into_iter().flatten().collect::<Vec<_>>();

self.inference_core_mut().decode_forward(
self.inference_core_mut().decode(
f0.len(),
OjtPhoneme::num_phoneme(),
&f0,
Expand Down
2 changes: 1 addition & 1 deletion crates/voicevox_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub enum Error {
}

fn base_error_message(result_code: VoicevoxResultCode) -> &'static str {
let c_message: &'static str = crate::voicevox_error_result_to_message(result_code);
let c_message: &'static str = crate::error_result_to_message(result_code);
&c_message[..(c_message.len() - 1)]
}

Expand Down
8 changes: 4 additions & 4 deletions crates/voicevox_core/src/include_models.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
Model{
yukarin_s_model: include_bytes!(concat!(
predict_duration_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/yukarin_s.onnx"
"/model/predict_duration.onnx"
)),
yukarin_sa_model: include_bytes!(concat!(
predict_intonation_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/yukarin_sa.onnx"
"/model/predict_intonation.onnx"
)),
decode_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
Expand Down
Loading