I want to convert an array of floats (one dimension) to an audio file -- then I want to send this audio file to a server with a put request, thus I need to convert it to Data.
How could I do this?? I have seen stack overflow posts about how to convert an array of floats to a wav file like this: Write array of floats to a wav audio file in swift
But I dont want to store anything, just convert it to a wav file, convert that to Data and send that to my db with a Put request. How can I do this? Thanks so much for your help!!