Search Unity

Create/transfer compressed audio file

Discussion in 'Audio & Video' started by cehkay, Aug 29, 2016.

  1. cehkay

    cehkay

    Joined:
    Sep 12, 2015
    Posts:
    4
    Mobile beeing the aimed devices i try to do the following:

    1. Record Audio from Microphone. (becomes a *.WAV)
    2. Upload file to a server (using "WWWForm.AddBinaryData")

    I accomplished both of these but ... the audio file is a WAV.
    This makes the files huge and the upload unneccessary long. Is there a way to compress the audio files using unity3d? i read a lot of documentation today and tested a little bit so i found out:

    Unity does compress when importing files (MP3 since mobile)
    When i click on a file in the editor, i can choose the import settings. And those settings would be PERFECT if i could use them during runtime on a saved file and re-save the outcome or send it.... :(

    I tried and tested a little bit with "GetAudioClipCompressed" but WWWForm either didnt accept it or had a warning that WAV file could not be streamed.

    Can anyone help? Any ideas?
    Is there maybe an Asset that can do this? Any workarounds? I really cant upload tens of MB of audio files ...


    TL;DR:
    Is there a way to:
    1. Save a Microphone record as a compressed file?
    2. Send a audio file compressed to a location?
    3. Send compressed audio data to a location?
     
  2. cehkay

    cehkay

    Joined:
    Sep 12, 2015
    Posts:
    4
    Is there really noone who knows how to solve this? :(
     
  3. wbeltran

    wbeltran

    Joined:
    Feb 8, 2018
    Posts:
    3
    You wouldn't have happened to solve this some time in the past four years, have you? I'm working on something very similar at the moment.
     
  4. imranmouna

    imranmouna

    Joined:
    Feb 6, 2017
    Posts:
    1