Questions tagged [audio]

Audio, or in terms of signal processing, an audio signal is an analog or digital representation of sound, typically as an electrical voltage.

Audio signals may be synthesized directly, or may originate at a transducer such as a microphone, musical instrument pickup, phonograph cartridge, or tape head. Loudspeakers or headphones convert an electrical audio signal into sound. Digital representations of audio signals exist in a variety of formats.

Source: Wikipedia.

1441 questions
67
votes
8 answers

How do I implement cross-correlation to prove two audio files are similar?

I have to do cross correlation of two audio file to prove they are similar. I have taken the FFT of the two audio files and have their power spectrum values in separate arrays. How should I proceed further to cross-correlate them and prove that…
Warrior
65
votes
10 answers

Algorithm(s) to mix audio signals without clipping

I'd like to mix two or more PCM audio channels (eg recorded samples) digitally in an acoustically-faithful manner, preferably in near-real-time (meaning little or no peek-ahead). The physically "correct" way to do this is summing the samples.…
bryhoyt
  • 1,353
  • 3
  • 11
  • 14
64
votes
6 answers

If humans can only hear up to 20 kHz frequency sound, why is music audio sampled at 44.1 kHz?

I read in some places that music is mostly sampled at 44.1 kHz whereas we can only hear up to 20 kHz. Why is it?
Soham De
  • 742
  • 1
  • 5
  • 7
56
votes
4 answers

Analogous Library to OpenCV for Audio Processing / Analysis

I understand OpenCV is the de facto library for programming image processing in C/C++; I'm wondering if there is a C or C++ library like that for audio processing. I basically want to filter raw waves from a microphone, and analyze them with some…
Tae-Sung Shin
  • 1,209
  • 1
  • 9
  • 19
50
votes
5 answers

What is the difference between phase delay and group delay?

I'm studying some DSP and I'm having trouble understanding the difference between phase delay and group delay. It seems to me that they both measure the delay time of sinusoids passed through a filter. Am I correct in thinking this? If so, how…
dB'
  • 965
  • 2
  • 9
  • 9
47
votes
6 answers

Simplest way of detecting where audio envelopes start and stop

Below is a signal which represents a recording of someone talking. I would like to create a series of smaller audio signals based on this. The idea being to detect when 'important' sound starts and ends and use those for markers to make new snippet…
Eric Brotto
  • 819
  • 2
  • 8
  • 11
36
votes
4 answers

Hilbert transform to compute signal envelope?

I've heard that the Hilbert transform can be used to calculate the envelope of a signal. How does this work? And how is this "Hilbert envelope" different from the envelope one gets by simply rectifying a signal? I'm interested specifically in…
dB'
  • 965
  • 2
  • 9
  • 9
36
votes
9 answers

Is there an algorithm for finding a frequency without DFT or FFT?

I was looking in the Android app store for a guitar tuner. I found a tuner app that claimed it was faster than other apps. It claimed it could find the frequency without using the DFT (I wish I still had the URL to this specification). I have never…
Slamice
  • 463
  • 1
  • 4
  • 6
35
votes
4 answers

What are good ways to detect signal clipping in a recording?

Given a recording I need to detect whether any clipping has occurred. Can I safely conclude there was clipping if any (one) sample reaches the maximum sample value, or should I look for a series of subsequent samples at the maximum level? The…
Han
  • 769
  • 1
  • 6
  • 10
31
votes
5 answers

How to create a sine wave generator that can smoothly transition between frequencies

I am able to write a basic sine wave generator for audio, but I want it to be able to smoothly transition from one frequency to another. If I just stop generating one frequency and immediately switch to another there will be a discontinuity in the…
Mark Heath
  • 411
  • 1
  • 4
  • 6
27
votes
6 answers

Why can so little digital information be stored on a cassette tape?

I had heard that tape is still the best medium for storing large amounts of data. So I figured I can store a relatively large amount of data on a cassette tape. I was thinking of a little project to read/write digital data on a cassette tape from my…
Pouria P
  • 373
  • 3
  • 5
27
votes
6 answers

Calculating the PDF of a waveform from its samples

A while ago I was trying different ways to draw digital waveforms, and one of the things I tried was, instead of the standard silhouette of the amplitude envelope, to display it more like an oscilloscope. This is what a sine and square wave look…
endolith
  • 14,765
  • 7
  • 63
  • 114
23
votes
4 answers

Reconstruction of audio signal from Spectrogram

I have a set of songs for which I extracted the magnitude spectrogram using a Hamming Window with 50% overlap. After extracting the spectrogram, I did some dimensionality reduction using Principal Components Analysis (PCA). After reducing it to…
user76170
  • 421
  • 1
  • 4
  • 6
23
votes
3 answers

Tips for improving pitch detection

I'm working on a simple web app that allows the user to tune his/her guitar. I'm a real beginner in signal processing, so please don't judge me too harshly if my question is inappropriate. So, I managed to get the fundamental frequency using an FFT…
Rad'Val
  • 433
  • 1
  • 4
  • 9
23
votes
6 answers

Why do we choose 44.1 kHz as recording sampling rate?

Peoples' ears can hear sound whose frequencies range from 20 Hz to 20 kHz. Based on the Nyquist theorem, the recording rate should be at least 40 kHz. Is it the reason for choosing 44.1 kHz?
new_comer_forever
  • 405
  • 1
  • 4
  • 9
1
2 3
96 97