Skip to content

Instantly share code, notes, and snippets.

@markshannon
Last active July 11, 2016 18:02
Show Gist options
  • Save markshannon/ee175c0ae66b3d4aa96b9ec2d42f48d1 to your computer and use it in GitHub Desktop.
Save markshannon/ee175c0ae66b3d4aa96b9ec2d42f48d1 to your computer and use it in GitHub Desktop.
class Voice:
def __init__(self, **config_options):
self.config(config_options)
def say(phonemes):
# This returns a generator (or C implemented iterator) of audio frames
...
def sing(phonemes):
# This returns a generator (or C implemented iterator) of audio frames
...
#Don't know what the best name for this is.
def recite(text)->phonemes:
...
def say(phonemes, **config_options):
Voice(**config_options).say(phonemes)
def sing(phonemes, **config_options):
Voice(**config_options).sing(phoneme)
def read(text, **config_options):
Voice(**config_options).say(recite(text))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment