Fixed the interruption problem encountered by pyaudio during playback

This commit is contained in:
Bigsk 2023-02-27 01:53:11 +08:00
parent c009e237ff
commit 938d195158
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
__title__ = "pycw"
__description__ = "Generate Morse Code (CW) audio files in Python."
__url__ = "https://github.com/bigsk05/pycw"
__version__ = '0.0.2'
__version__ = '0.0.3'
__author__ = "Ian Xia"
__author_email__ = "i@ianxia.com"
__license__ = "Apache 2.0"

View File

@ -78,7 +78,7 @@ def generate(
) -> numpy.array:
text = normalize_text(text)
samples = list(_generate_samples(text, wpm, tone, volume, sample_rate))
return numpy.concatenate(samples)
return numpy.concatenate(samples).tobytes()
def stream_wave(