orbichord/utils.py
def playAudio(stream):
    """Generate audio play from stream."""
    midi = stream.write('midi')
    fs = FluidSynth('/usr/share/soundfonts/FluidR3_GM.sf2')
    filename = 'audio-{}.wav'.format(uuid.uuid4().hex)
    fs.midi_to_audio(midi, filename)
    audio = Audio(filename=filename)
    os.remove(filename)
    return audio
Generate audio play from stream.
Generate audio play from stream.
Generate audio play from stream .
def playAudio(stream):
    midi = stream.write('midi')
    fs = FluidSynth('/usr/share/soundfonts/FluidR3_GM.sf2')
    filename = 'audio-{}.wav'.format(uuid.uuid4().hex)
    fs.midi_to_audio(midi, filename)
    audio = Audio(filename=filename)
    os.remove(filename)
    return audio
def playAudio ( stream ) : midi = stream . write ( 'midi' ) fs = FluidSynth ( '/usr/share/soundfonts/FluidR3_GM.sf2' ) filename = 'audio-{}.wav' . format ( uuid . uuid4 ( ) . hex ) fs . midi_to_audio ( midi , filename ) audio = Audio ( filename = filename ) os . remove ( filename ) return audio
Generate audio play from stream.
Generate audio play from stream .
"""Generate audio play from stream."""
stream