Skip to content

Commit

Permalink
better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Yosshi999 committed Nov 15, 2024
1 parent 88293ca commit 255a3ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions example/python/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ def main() -> None:
if streaming:
logger.info("%s", "In streaming mode")
chunk_sec = 1.0
intermediate = synthesizer.precompute_render(audio_query, style_id)
chunk_frames = int(intermediate.frame_rate * chunk_sec)
audio_feature = synthesizer.precompute_render(audio_query, style_id)
chunk_frames = int(audio_feature.frame_rate * chunk_sec)
pcm = b""
for i in range(0, intermediate.frame_length, chunk_frames):
logger.info("%s", f"{i/intermediate.frame_length:.2%}")
for i in range(0, audio_feature.frame_length, chunk_frames):
logger.info("%s", f"{i/audio_feature.frame_length:.2%}")
pcm += synthesizer.render(
intermediate, i, min(i + chunk_frames, intermediate.frame_length)
audio_feature, i, min(i + chunk_frames, audio_feature.frame_length)
)
logger.info("%s", f"100%")
wav = wav_from_s16le(
Expand Down

0 comments on commit 255a3ef

Please sign in to comment.