Skip to content

Commit

Permalink
Merge pull request #68 from voicevox-client/tuna2134-patch-1
Browse files Browse the repository at this point in the history
Fix example code
  • Loading branch information
tuna2134 authored May 16, 2024
2 parents b130abf + 08308c8 commit f210d56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ Example
async def main():
async with Client() as client:
audio_query = await client.create_audio_query(
"こんにちは!", style_id=1
"こんにちは!", speaker=1
)
with open("voice.wav", "wb") as f:
f.write(await audio_query.synthesis(style_id=1))
f.write(await audio_query.synthesis(speaker=1))
if __name__ == "__main__":
Expand Down
3 changes: 3 additions & 0 deletions vvclient/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ async def core_versions(self) -> List[str]:

async def initialize_speaker(self, params: Dict[str, Union[str, int]]) -> None:
return await self.request(Route("POST", "/initialize_speaker"), params=params)

async def is_initialized_speaker(self, params: Dict[str, Union[str, int]) -> bool:
return await self.request(Route("GET", "/is_initialized_speaker"), params=params)

0 comments on commit f210d56

Please sign in to comment.