-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from o108minmin/107-add-cevioai
add cevioai
- Loading branch information
Showing
11 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# halberd with CeVIO AI | ||
|
||
halberdをCeVIO AIで利用するための設定やtipsです | ||
|
||
## テキスト書き出し設定 | ||
|
||
音声書き出し | ||
|
||
- ファイル -> エクスポート -> セリフ連続WAVの書き出し | ||
- セリフをテキスト出力:有効 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use std::boxed::Box; | ||
|
||
use assert_cmd::Command; | ||
use predicates::prelude::*; | ||
|
||
#[test] | ||
// 入力値が正常だったとき(srtで出力) | ||
fn normal_cevioai() -> Result<(), Box<dyn std::error::Error>> { | ||
let expected = "1\n00:00:00,000 --> 00:00:01,445\nこんにちは\n\n2\n00:00:01,446 --> 00:00:04,521\nこのダミーにはなんでも書いてあるの\n\n"; | ||
|
||
let mut cmd = Command::cargo_bin("halberdcli").unwrap(); | ||
let assert = cmd.arg("cevioai").arg("tests/data/tts/cevioai").assert(); | ||
assert.success().stdout(predicate::str::contains(expected)); | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
こんにちは |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
このダミーにはなんでも書いてあるの |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//! CeVIO AI関係のモジュール | ||
use std::error::Error; | ||
use std::path::PathBuf; | ||
|
||
use crate::text; | ||
use crate::tts; | ||
use crate::wav; | ||
|
||
pub struct Cevioai {} | ||
|
||
impl tts::profile::TTS for Cevioai { | ||
fn serif_generator(&self, path: PathBuf) -> Result<String, Box<dyn Error>> { | ||
text::generate_subtitle_from_txt(path) | ||
} | ||
fn wave_time_generator(&self, path: PathBuf) -> Result<f64, Box<dyn Error>> { | ||
wav::calculate_wave_seconds(path) | ||
} | ||
fn get_profile_name(&self) -> &'static str { | ||
"cevioai" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod aivoice; | ||
pub mod cevioai; | ||
pub mod coefont; | ||
pub mod profile; | ||
pub mod service; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters