News for hackers. Stuff that matters.
Re:Text to speech in Python by d0mine on Saturday June 24, 2017 @08:50PM (#14628103)
In Pythonista for iOS:

  import speech

  speech.say('Hola mundo', 'es_ES')
In reverse, to record a sound for three seconds:

  import sound

  r = sound.Recorder('audio.m4a')
  r.record(3)  # seconds
To recognize it as text:

  text = speech.recognize('audio.m4a', 'en')[0][0]  # sent to Apple servers

There are no comments on this comment yet.