how to merge two audio stream and save as wav

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By leo-pnt

If I have two AudioStreamPlayer each with a different stream, is it possible to merge those stream to save it as one wav file ?
I mean by using mergedStream.save_to_wav(file_path)

I suppose it’s possible to listen to both AudioStreamPlayer with a recorder one and save the created stream
But for long records, it’s a lost of time. I want to run it on Android so there is no way I can use external binaries like ffmpeg…

[edit]
Maybe with C# and external libraries ? I really have no idea

:bust_in_silhouette: Reply From: Calinou

Godot doesn’t feature a WAV encoder, so this isn’t possible without using an add-on of some sort.

Ok thanks I’ll look if it’s possible by writing some c++
by the way,

I suppose it’s possible to listen to both AudioStreamPlayer with a
recorder one and save the merged stream

This works great appart from the fact that it’s “slow”

leo-pnt | 2021-01-26 19:23