mirror of
https://github.com/neodyland/sbv2-api.git
synced 2025-12-22 15:39:58 +00:00
19 lines
482 B
Python
19 lines
482 B
Python
import requests
|
|
|
|
|
|
data = (requests.get("http://localhost:8080/audio_query", params={
|
|
"text": "こんにちは、今日はいい天気ですね。",
|
|
})).json()
|
|
print(data)
|
|
|
|
data = (requests.post("http://localhost:8080/synthesis", json={
|
|
"text": data["text"],
|
|
"ident": "tsukuyomi",
|
|
"speaker_id": 0,
|
|
"style_id": 0,
|
|
"sdp_ratio": 0.5,
|
|
"length_scale": 0.5,
|
|
"audio_query": data["audio_query"],
|
|
})).content
|
|
with open("test.wav", "wb") as f:
|
|
f.write(data) |