Skip to content

neosapience/typecast-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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