Search Unity

Audio How to get the spectrogram from an audio file?

Discussion in 'Audio & Video' started by Kheoss, Jan 6, 2019.

  1. Kheoss

    Kheoss

    Joined:
    Apr 24, 2018
    Posts:
    1
    So i'm trying to map some audio into an image (spectogram) in this way :
    *Get the spectrum data (512 samples).
    *Make an png 512*512 => the value of the pixel on the row i and col j = the amplitude on the frequency j for the sample j ( it take aprox 10 seconds for the image to be created)

    [512 samples for the spectrum data => 43 Hz / sample]

    but the results are not so good (i uploaded one of those bellow).

    My goal is to feed an Convolutional Neural Network with those images but with my technique i gen an precision of 56% which is not good at all:(

    Some advices please?
     

    Attached Files:

    • 9.png
      9.png
      File size:
      19.4 KB
      Views:
      131
  2. WashingMachine

    WashingMachine

    Unity Technologies

    Joined:
    Mar 23, 2017
    Posts:
    24
    Heya!
    Could you post your code?