Hi,
I'm using this code:
with open(f'{x}.wav', 'wb') as f:
for chunk in client.tts("Can you tell me your account email or, ah your phone number?", options):
if not chunk:
break
print(type(chunk))
f.write(chunk)
However it does not terminate the script after the audio has finished generating, how can I detect when the audio is done generating and stop?
Thank you!
cc @NCarrollPlay @mahmoudfelfel