getnamo / TensorFlow-Unreal

TensorFlow plugin for the Unreal Engine.
Other
1.15k stars 211 forks source link

TFAudioCapture for recording audio #58

Open eternalfusion opened 4 years ago

eternalfusion commented 4 years ago

After a lot of searching over the Internet I've found solution for capturing audio input (from the mic, I hope) in TFAudioCapture Component. So I made BPs like it was in #27 issue, but it wasn't worked, I guess (using To SoundWave (WAV Bytes) Node). Any examples for this feature? What I potentially did wrong? And could buffer which I got from OnAudioData could be successfully replicated through network?

getnamo commented 4 years ago

I haven't tested this feature in a while, first question: are you getting the OnAudioData event? Is it non-null? It's possible that the recorded data comes out as raw and you need to convert it first from Raw to Wav (https://github.com/getnamo/tensorflow-ue4/blob/master/Source/TFAudioCapture/Public/TFAudioCaptureComponent.h#L42) and then to SoundWave.

If you store the TArray buffer in a struct that can replicate over it should come along for the ride, or use https://github.com/getnamo/udp-ue4, https://github.com/getnamo/tcp-ue4, or https://github.com/getnamo/socketio-client-ue4 to side network the data in a dedicated manner.