Questions tagged [spectrogram]

A spectrogram, or sonogram, is a visual representation of the spectrum of frequencies in a sound, at each time. Spectrograms are also called spectral waterfalls, voiceprints, or voicegrams. Spectrograms are used extensively in the development of the fields of music, sonar, radar, and speech processing, seismology, etc.

502 questions
2
votes
0 answers

Can I run python code in flutter application?

I want my flutter application to use .tflite model to classify audio recordings. However my model input is spectrograms (not audio files). Is there a way I can run python function that converts audio to spectrogram on flutter? I tried using starflut…
2
votes
0 answers

How to make all Mel Spectrograms have the same array shape?

I'm trying to use Mel Spectrograms from audio files of varying lengths for an Automatic Speech Recognition system. Using Mel, the shape is (128,x), where x is different for every file depending on the audio length. n_fft = 2048 hop_length =…
2
votes
1 answer

How to use tfa.image.sparse_image_warp?

I have the log mel spectrograms of a few audio clips and I am trying to augment the spectrograms using tfa.image.sparse_image_warp so that time warping can be achieved as done in Google's SpecAugment. But I am confused on how to do achieve time…
VITTHAL BHANDARI
  • 139
  • 2
  • 5
  • 15
2
votes
1 answer

What is the best way to plot a spectrogram with openGL

I have written a code to calculate the spectrogram of a sine & cos signals, applied the Hann Window, calculated FFT, Calculated log magnitude of frequency coefficients. I tested that it is all working by writing a simple function in openGL to plot a…
yarin Cohen
  • 995
  • 1
  • 13
  • 39
2
votes
0 answers

Create same mel-spectrogram on server (python) and client (javascript) with librosa/TensorFlow

I am currently working on a project where I need to create mel-spectrograms to classify WAV audio-files with a neuronal network. In order to have a valid input to train my network, I first have to convert these audio-files into a mel-spectrogram. To…
2
votes
0 answers

How to calculate peaks of the frequencies in audio frequency spectrum with python

I have a audio file consisting of multiple frequencies, I need to find all the frequency peaks in the frequency spectrum after doing FFT. But the issue is how can I be able to set the threshold line for the peaks. enter image description here As…
astrick
  • 190
  • 1
  • 9
2
votes
0 answers

Possible to reconstruct audio only with spectrogram image?

So I'm creating some spectrograms with librosa to be saved as images, after which I intend to make modifications to the image directly (ie. add random noise, etc), then I would like to reconstruct the audio from that image. Anyway, some research led…
V Begha
  • 49
  • 1
2
votes
0 answers

Drawing Dynamic Spectrogram in real time

I essentially have three data points in three separate numpy array and I want to plot the time along the x-axis, the frequency along the y-axis and the magnitude should represent the colors. But this is all happening in real time so it should look…
lionheart
  • 333
  • 2
  • 11
2
votes
1 answer

What does "dash" - mean as ffmpeg output filename

I'm trying to use ffmpeg with gnuplot to draw some audio spectra, I'm following this ffmpeg doc link. Now I'm asking what "dash" - means on this line right after -f data, it should be a filename: the last element of ffmpeg command should the output…
DDS
  • 2,340
  • 16
  • 34
2
votes
1 answer

Obspy spectrogram ValueError (noverlap must be less than n)

I working with seismic data using obspy and I want to get a spectrogram for my data. When I apply the spectrogram function to the initial data everything works fine. st.spectrogram(log=True, title='BW.RJOB ' + str(st[0].stats.starttime)) However…
arisAbCy
  • 71
  • 7
2
votes
1 answer

Librosa's inverse mel spectrogram to stft taking a long time

I am currently trying to convert a mel spectrogram back into an audio file, however, librosa's mel_to_stft function is taking a long time (upwards to 15 minutes) to read in a 30 second .wav file sampled at 384kHz. The following is my code: # Code…
Sam
  • 43
  • 6
2
votes
1 answer

Spectrogram generation in java using FFT on a .wav file not producing expected output

So I am making an AI project that classifies speech into either "up", "down", "left", right or background noise, and from this, a character in a videogame is moved. I have made an FFT algorithm deriving it from the mathematical explanation, which I…
2
votes
0 answers

Extract db spectrogram from an audio file, denoise the spectrogram and convert it back to audio

I am trying to apply some image processing techniques to a spectrogram that was created by an audio file. In this example, I would like to apply a de-noising algorithm to the spectrogram and then inverse it back to audio. How would this be done…
eskay
  • 21
  • 2
2
votes
1 answer

Error: Mismatch in sampling rate: Expected: 16000; Actual: 48000. Tensorflow js throwing error

I want to record the audio at 16000Hz and get the spectrogram of it. My model takes input of [null.1998.101]. I am unable to achieve it in javascript const mic = await tf.data.microphone({ fftSize: 256, columnTruncateLength: 101, …
2
votes
2 answers

Combine 2 images as a single planar image

I have two separate gray scale images im1 (Fig1) and im2 (Fig2) each of size 50 by 50 that are displayed here by color coding them. When I combine them together using cat() command and then display the result of concatenated images, they get…
Sm1
  • 560
  • 2
  • 6
  • 24