module mokadi.mokadi_record

Short summary

module botadi.mokadi.mokadi_record

Record a couple of seconds and returns the raw stream.

source on GitHub

Functions

function

truncated documentation

play_speech

Play a way

record_speech

Records 5 seconds by default and returns the bytes which contains that sound.

Documentation

Record a couple of seconds and returns the raw stream.

source on GitHub

botadi.mokadi.mokadi_record.play_speech(filename_or_bytes, CHUNK=1024)

Play a way

Parameters

filename_or_bytes – wav file or bytes

See pyaudio for the others parameters.

source on GitHub

botadi.mokadi.mokadi_record.record_speech(RECORD_SECONDS=5, CHUNK=1024, FORMAT=None, CHANNELS=2, RATE=44100, WAVE_OUTPUT_FILENAME=None, fLOG=<function noLOG>)

Records 5 seconds by default and returns the bytes which contains that sound.

Parameters
  • RECORD_SECONDS – number of seconds to record

  • WAVE_OUTPUT_FILENAME – if not None, also saves the result as a filename

Returns

bytes

See pyaudio for the others parameters.

source on GitHub