Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 858 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 858 Bytes

typecastai-python

Basic example

from typecastai import Typecast

cli = Typecast(api_token='your token here!!')
audio = cli.generate_speech('A fence cuts through the corner lot.')

with open('out.wav', 'wb') as f:
    f.write(audio)

Specify output format: mp3

from typecastai import Typecast

cli = Typecast(api_token='your token here!!')
audio = cli.generate_speech('A fence cuts through the corner lot.', filetype='mp3')

with open('out.mp3', 'wb') as f:
    f.write(audio)

More documentations