Hello, I am doing some mixing and transformations of audio files and want to send them to a server via UDP. I can do it with ffmpeg but this works only for a static file, while I am doing some mixing in realtime
ffmpeg -re -i audio.m4a -f f32le -acodec pcm_f32le -ar 44100 -ac 1 udp://ip:port
How can I achieve this in TD?
I found the solution. All I needed was to add a Script CHOP and send the audio buffers:
def onCook(scriptOp): audio_chop = scriptOp.inputs[0] channel = audio_chop.chan(0) buffer = channel.numpyArray().tobytes() udp.sendBytes(buffer) return
Please le me know if there is a more efficient way.