Skip to content

Commit

Permalink
feat!: [Python] デフォルト引数の前に一律で*,を挟む (#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip authored Feb 11, 2025
1 parent 2afaf51 commit 849f5b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class Synthesizer:
self,
onnxruntime: Onnxruntime,
open_jtalk: OpenJtalk,
*,
acceleration_mode: AccelerationMode = "AUTO",
cpu_num_threads: int = 0,
) -> None: ...
Expand Down Expand Up @@ -377,6 +378,7 @@ class Synthesizer:
self,
audio_query: AudioQuery,
style_id: StyleId | int,
*,
enable_interrogative_upspeak: bool = True,
) -> bytes:
"""
Expand All @@ -400,6 +402,7 @@ class Synthesizer:
self,
kana: str,
style_id: StyleId | int,
*,
enable_interrogative_upspeak: bool = True,
) -> bytes:
"""
Expand All @@ -419,6 +422,7 @@ class Synthesizer:
self,
text: str,
style_id: StyleId | int,
*,
enable_interrogative_upspeak: bool = True,
) -> bytes:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class Synthesizer:
self,
onnxruntime: Onnxruntime,
open_jtalk: OpenJtalk,
*,
acceleration_mode: AccelerationMode = "AUTO",
cpu_num_threads: int = 0,
) -> None: ...
Expand Down Expand Up @@ -374,6 +375,7 @@ class Synthesizer:
self,
audio_query: AudioQuery,
style_id: StyleId | int,
*,
enable_interrogative_upspeak: bool = True,
) -> AudioFeature: ...
def __render(
Expand All @@ -386,6 +388,7 @@ class Synthesizer:
self,
audio_query: AudioQuery,
style_id: StyleId | int,
*,
enable_interrogative_upspeak: bool = True,
) -> bytes:
"""
Expand All @@ -409,6 +412,7 @@ class Synthesizer:
self,
kana: str,
style_id: StyleId | int,
*,
enable_interrogative_upspeak: bool = True,
) -> bytes:
"""
Expand All @@ -428,6 +432,7 @@ class Synthesizer:
self,
text: str,
style_id: StyleId | int,
*,
enable_interrogative_upspeak: bool = True,
) -> bytes:
"""
Expand Down
9 changes: 9 additions & 0 deletions crates/voicevox_core_python_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ mod blocking {
#[pyo3(signature =(
onnxruntime,
open_jtalk,
*,
acceleration_mode = Default::default(),
cpu_num_threads = voicevox_core::__internal::interop::DEFAULT_CPU_NUM_THREADS,
))]
Expand Down Expand Up @@ -679,6 +680,7 @@ mod blocking {
#[pyo3(signature=(
audio_query,
style_id,
*,
enable_interrogative_upspeak =
voicevox_core::__internal::interop::DEFAULT_ENABLE_INTERROGATIVE_UPSPEAK,
))]
Expand Down Expand Up @@ -731,6 +733,7 @@ mod blocking {
#[pyo3(signature=(
audio_query,
style_id,
*,
enable_interrogative_upspeak =
voicevox_core::__internal::interop::DEFAULT_ENABLE_INTERROGATIVE_UPSPEAK,
))]
Expand All @@ -754,6 +757,7 @@ mod blocking {
#[pyo3(signature=(
kana,
style_id,
*,
enable_interrogative_upspeak =
voicevox_core::__internal::interop::DEFAULT_ENABLE_INTERROGATIVE_UPSPEAK,
))]
Expand All @@ -778,6 +782,7 @@ mod blocking {
#[pyo3(signature=(
text,
style_id,
*,
enable_interrogative_upspeak =
voicevox_core::__internal::interop::DEFAULT_ENABLE_INTERROGATIVE_UPSPEAK,
))]
Expand Down Expand Up @@ -1102,6 +1107,7 @@ mod asyncio {
#[pyo3(signature =(
onnxruntime,
open_jtalk,
*,
acceleration_mode = Default::default(),
cpu_num_threads = voicevox_core::__internal::interop::DEFAULT_CPU_NUM_THREADS,
))]
Expand Down Expand Up @@ -1369,6 +1375,7 @@ mod asyncio {
#[pyo3(signature=(
audio_query,
style_id,
*,
enable_interrogative_upspeak =
voicevox_core::__internal::interop::DEFAULT_ENABLE_INTERROGATIVE_UPSPEAK,
))]
Expand Down Expand Up @@ -1401,6 +1408,7 @@ mod asyncio {
#[pyo3(signature=(
kana,
style_id,
*,
enable_interrogative_upspeak =
voicevox_core::__internal::interop::DEFAULT_ENABLE_INTERROGATIVE_UPSPEAK,
))]
Expand Down Expand Up @@ -1436,6 +1444,7 @@ mod asyncio {
#[pyo3(signature=(
text,
style_id,
*,
enable_interrogative_upspeak =
voicevox_core::__internal::interop::DEFAULT_ENABLE_INTERROGATIVE_UPSPEAK,
))]
Expand Down

0 comments on commit 849f5b0

Please sign in to comment.