This commit is contained in:
tuna2134
2024-09-10 09:46:06 +00:00
parent 3bbaf19e36
commit 28b57ce8b3
3 changed files with 3 additions and 4 deletions

Binary file not shown.

View File

@@ -29,9 +29,9 @@ async fn synthesize(
tts_model
} else {
*tts_model = Some(TTSModel::new(
env::var("BERT_MODEL_PATH")?,
env::var("MAIN_MODEL_PATH")?,
env::var("STYLE_VECTORS_PATH")?,
&env::var("BERT_MODEL_PATH")?,
&env::var("MAIN_MODEL_PATH")?,
&env::var("STYLE_VECTORS_PATH")?,
)?);
tts_model.as_ref().unwrap()
};

View File

@@ -4,6 +4,5 @@ import requests
res = requests.post('http://localhost:3000/synthesize', json={
"text": "おはよう"
})
res.raise_for_status()
with open('output.wav', 'wb') as f:
f.write(res.content)