diff --git a/tests/test_basic.py b/tests/test_basic.py index 21a47f6..7aa2573 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("こんにちは!", speaker=1) - await audio_query.synthesis(speaker=1) + audio_query = await client.create_audio_query("こんにちは!", style_id=1) + await audio_query.synthesis(style_id=1) diff --git a/voicevox/audio_query.py b/voicevox/audio_query.py index a55099f..e836a29 100644 --- a/voicevox/audio_query.py +++ b/voicevox/audio_query.py @@ -152,11 +152,11 @@ async def synthesis( self, *, enable_interrogative_upspeak: bool = True, - speaker: int, + style_id: int, core_version: Optional[str] = None, ) -> bytes: params = { - "speaker": speaker, + "style_id": style_id, "enable_interrogative_upspeak": enable_interrogative_upspeak, } if core_version is not None: diff --git a/voicevox/client.py b/voicevox/client.py index 5f9b739..b3895f0 100644 --- a/voicevox/client.py +++ b/voicevox/client.py @@ -52,7 +52,7 @@ async def __aexit__(self, *args) -> None: await self.close() async def create_audio_query( - self, text: str, speaker: int, *, core_version: Optional[str] = None + self, text: str, style_id: int, *, core_version: Optional[str] = None ) -> AudioQuery: """Create audio query @@ -72,7 +72,7 @@ async def create_audio_query( AudioQuery Audio query, that run synthesis. """ - params = {"text": text, "speaker": speaker} + params = {"text": text, "style_id": style_id} if core_version is not None: params["core_version"] = core_version audio_query = await self.http.create_audio_query(params)