From c78095b067d591d9e4182d26da4c051d784cc82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=B3=E3=83=9E=E3=83=AA=E3=83=B3=E8=A6=AA=E8=A1=9B?= =?UTF-8?q?=E9=9A=8A?= Date: Sun, 4 Feb 2024 06:44:49 +0000 Subject: [PATCH] Update audio_query.py to use speaker instead of style_id --- tests/test_basic.py | 4 ++-- voicevox/audio_query.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index 7aa2573..21a47f6 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -6,5 +6,5 @@ @pytest.mark.asyncio async def test_basic(): async with Client() as client: - audio_query = await client.create_audio_query("こんにちは!", style_id=1) - await audio_query.synthesis(style_id=1) + audio_query = await client.create_audio_query("こんにちは!", speaker=1) + await audio_query.synthesis(speaker=1) diff --git a/voicevox/audio_query.py b/voicevox/audio_query.py index e836a29..a55099f 100644 --- a/voicevox/audio_query.py +++ b/voicevox/audio_query.py @@ -152,11 +152,11 @@ async def synthesis( self, *, enable_interrogative_upspeak: bool = True, - style_id: int, + speaker: int, core_version: Optional[str] = None, ) -> bytes: params = { - "style_id": style_id, + "speaker": speaker, "enable_interrogative_upspeak": enable_interrogative_upspeak, } if core_version is not None: