Skip to content

Commit

Permalink
モデルを複数にする (VOICEVOX#364)
Browse files Browse the repository at this point in the history
* モデルを2つにする

* a
  • Loading branch information
Hiroshiba authored Jan 4, 2023
1 parent 3238c04 commit da99592
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 6 deletions.
20 changes: 17 additions & 3 deletions crates/voicevox_core/src/include_models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@
Model{
predict_duration_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/predict_duration.onnx"
"/model/predict_duration-0.onnx"
)),
predict_intonation_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/predict_intonation.onnx"
"/model/predict_intonation-0.onnx"
)),
decode_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/decode.onnx"
"/model/decode-0.onnx"
)),
},
Model{
predict_duration_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/predict_duration-1.onnx"
)),
predict_intonation_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/predict_intonation-1.onnx"
)),
decode_model: include_bytes!(concat!(
env!("CARGO_WORKSPACE_DIR"),
"/model/decode-1.onnx"
)),
},
]
2 changes: 2 additions & 0 deletions crates/voicevox_core/src/include_speaker_id_map.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[
(0, (0, 0)),
(1, (0, 1)),
(2, (1, 0)),
(3, (1, 1)),
]
4 changes: 1 addition & 3 deletions crates/voicevox_core/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,7 @@ mod tests {
let mut status = Status::new(true, 0);
let result = status.load_metas();
assert_eq!(Ok(()), result);
let mut expected = BTreeSet::new();
expected.insert(0);
expected.insert(1);
let expected = BTreeSet::from([0, 1, 2, 3]);
assert_eq!(expected, status.supported_styles);
}

Expand Down
File renamed without changes.
Binary file added model/decode-1.onnx
Binary file not shown.
9 changes: 9 additions & 0 deletions model/metas.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@
],
"speaker_uuid": "dd9ccd75-75f6-40ce-a3db-960cbed2e905",
"version": "0.0.1"
},
{
"name": "dummy3",
"styles": [
{ "name": "style3-1", "id": 2 },
{ "name": "style3-2", "id": 3 }
],
"speaker_uuid": "5d3d9aa9-88e5-4a96-8ef7-f13a3cad1cb3",
"version": "0.0.1"
}
]
File renamed without changes.
Binary file added model/predict_duration-1.onnx
Binary file not shown.
File renamed without changes.
Binary file added model/predict_intonation-1.onnx
Binary file not shown.

0 comments on commit da99592

Please sign in to comment.