Skip to content

Commit

Permalink
Fix audio query parameters and payload data types
Browse files Browse the repository at this point in the history
  • Loading branch information
tuna2134 authored Mar 15, 2023
1 parent 757b850 commit c5dfb5e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions voicevox/audio_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ class AudioQuery:
"""

def __init__(
self, http: HttpClient, payload: AudioQueryType,
speaker: int
self, http: HttpClient, payload: AudioQueryType
):
self.http = http
self.__data = payload
Expand All @@ -132,8 +131,6 @@ def __init__(
self.output_sampling_rate: int = payload["outputSamplingRate"]
self.output_stereo: bool = payload["outputStereo"]

self.speaker = speaker

@property
def kana(self) -> str:
return self.__data["kana"]
Expand All @@ -157,10 +154,10 @@ def to_dict(self) -> AudioQueryType:

async def synthesis(
self, *, enable_interrogative_upspeak: bool = True,
core_version: Optional[str] = None, speaker: Optional[int] = None
speaker: int, core_version: Optional[str] = None
) -> bytes:
params = {
"speaker": speaker or self.speaker,
"speaker": speaker,
"enable_interrogative_upspeak": enable_interrogative_upspeak
}
if core_version is not None:
Expand Down

0 comments on commit c5dfb5e

Please sign in to comment.