DSPRelated.com
Forums

basic speech analysis: amplitude, phase, intensity

Started by nataliya July 28, 2008
I'm probably asking you very stupid question,
but i'm totally new to the field of Audio processing/analysis. I have
recording of someone talking and I need to compute few basic
characteristics for audio features: amplitude, phase, intensity.

How do I start with it? If you know any useful online resources, please
let me know. I'm using matlab a lot, if you have any library functions that
do this job in matlab, please let me know. 

Thanks a lot for any help.

Nat.



nataliya wrote:
> I'm probably asking you very stupid question, > but i'm totally new to the field of Audio processing/analysis. I have > recording of someone talking and I need to compute few basic > characteristics for audio features: amplitude, phase, intensity. > > How do I start with it? If you know any useful online resources, please > let me know. I'm using matlab a lot, if you have any library functions that > do this job in matlab, please let me know. > > Thanks a lot for any help.
Nat, You need to define exactly what you mean. Your might better understand your needs when you express them in terms that others can understand. Points that puzzle me: How does amplitude differ from intensity? Phase of what relative to what? Strictly, two signals must have the same frequency in order for their phases to be compared. Sometimes, conditions can be imposed to get around this, but they must be explicitly stated. N.B. Matlab simplifies some calculations. With _good_ luck, it can apply *methods* you don't understand. Only by _dumb_ luck is it ever useful for solving *problems* you don't understand. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Thanks for your reply.

It seems that there is a different between amplitute and intensity,
although both are related notions:

http://www.indiana.edu/~emusic/acoustics/amplitude.htm

I do not compare two signals. I just want to have characteristics of a
single audio voice signal. 

Regarding matlab, I wouldn't ask questions here if I haven't tried to
understand what I need to implement. 
Curiously enough people usually tend to calculate sound energy for
different frequency bands. I wonder if I should do the same with amplitude
calculations. 
There is also another notion of envelope of wave signal which is related
to variation of amplitude. I wonder if I should rather use this.

The problem with amplitude in speech domain is that it's rather
undefined.

Nat.
>nataliya wrote: >> I'm probably asking you very stupid question, >> but i'm totally new to the field of Audio processing/analysis. I have >> recording of someone talking and I need to compute few basic >> characteristics for audio features: amplitude, phase, intensity. >> >> How do I start with it? If you know any useful online resources,
please
>> let me know. I'm using matlab a lot, if you have any library functions
that
>> do this job in matlab, please let me know. >> >> Thanks a lot for any help. > >Nat, > >You need to define exactly what you mean. Your might better understand >your needs when you express them in terms that others can understand. > >Points that puzzle me: >How does amplitude differ from intensity? >Phase of what relative to what? > >Strictly, two signals must have the same frequency in order for their >phases to be compared. Sometimes, conditions can be imposed to get >around this, but they must be explicitly stated. > >N.B. Matlab simplifies some calculations. With _good_ luck, it can apply
>*methods* you don't understand. Only by _dumb_ luck is it ever useful >for solving *problems* you don't understand. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
[edited post to be "bottom post" RO]
nataliya wrote:

> Jerry wrote: > >>nataliya wrote: >> >>>I'm probably asking you very stupid question, >>>but i'm totally new to the field of Audio processing/analysis. I have >>>recording of someone talking and I need to compute few basic >>>characteristics for audio features: amplitude, phase, intensity. >>> >>>How do I start with it? If you know any useful online resources, please >>>let me know. I'm using matlab a lot, if you have any library functions >>>that do this job in matlab, please let me know. >>> >>>Thanks a lot for any help. >> >>Nat, >> >>You need to define exactly what you mean. Your might better understand >>your needs when you express them in terms that others can understand. >> >>Points that puzzle me: >>How does amplitude differ from intensity? >>Phase of what relative to what? >> >>Strictly, two signals must have the same frequency in order for their >>phases to be compared. Sometimes, conditions can be imposed to get >>around this, but they must be explicitly stated. >> >>N.B. Matlab simplifies some calculations. With _good_ luck, it can apply > > >>*methods* you don't understand. Only by _dumb_ luck is it ever useful >>for solving *problems* you don't understand. >> >>Jerry >>-- >>Engineering is the art of making what you want from things you can get.
> > > Thanks for your reply. > > It seems that there is a different between amplitude and intensity, > although both are related notions: > > http://www.indiana.edu/~emusic/acoustics/amplitude.htm > The general convention of this group is to bottom post for ease of following what's already been said. Actually amplitude and intensity are *EXTREMELY* closely related. Using the definitions from that page intensity = a constant(with appropriate units of measure) times the square of the amplitude Now I'll repeat advice Jerry (and others ;) have frequently given me. Where did you start? Where do you wish to go? What progress have you made?
nataliya wrote:
> Thanks for your reply. > > It seems that there is a different between amplitute and intensity, > although both are related notions: > > http://www.indiana.edu/~emusic/acoustics/amplitude.htm
You have correctly identified sound intensity as acoustic power per unit area at a particular point in space. I must wonder if you understand how that relates to the measurements you have.
> I do not compare two signals. I just want to have characteristics of a > single audio voice signal.
The notion of phase involves comparison. Just as you cannot speak of distance when there is only one point, you cannot speak of phase when there is only one signal. The second signal is often implicit, just as sea level is often an implicit reference for altitude.
> Regarding matlab, I wouldn't ask questions here if I haven't tried to > understand what I need to implement. > Curiously enough people usually tend to calculate sound energy for > different frequency bands. I wonder if I should do the same with amplitude > calculations.
Energy applies only if it is loosely used (which it often is). It is the product of power and time. Power is proportional to amplitude squared, so it easy to find one of you know the other. The analysis of speech clearly requires knowledge of signal strengths at different frequencies.
> There is also another notion of envelope of wave signal which is related > to variation of amplitude. I wonder if I should rather use this.
I can think of a few ways to define the envelope of a speech signal, none of them useful as far as I can see. An envelope is a relatively low-frequency curve that is tangent to a higher-frequency one at or near all the high-frequency positive or negative peaks.
> The problem with amplitude in speech domain is that it's rather > undefined.
Amplitude is strictly defined for individual sinusoids. It needs explicit special definitions in all other cases. ... Jerry -- Engineering is the art of making what you want from things you can get.
What you may implement is perform Linear prediction analysis on voice
signal that you have mentioned and make the following observations.

1.Spectral envelope
2. formant frequencies
3.spectral amplitude at formant frequencies.
4.Linear prediction residual and its periodicity.
5 You may compare energy in the high frequency band and low frequency
band.(for voicing decision). .

the foll. paper might be of help.
http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/5/31191/01451722.pdf?temp=x

Alternatively you may go for Cepstral Analysis.



On Jul 28, 8:59 pm, "nataliya" <nadtok...@yahoo.com> wrote:
> Thanks for your reply. > > It seems that there is a different between amplitute and intensity, > although both are related notions: > > http://www.indiana.edu/~emusic/acoustics/amplitude.htm > > I do not compare two signals. I just want to have characteristics of a > single audio voice signal. > > Regarding matlab, I wouldn't ask questions here if I haven't tried to > understand what I need to implement. > Curiously enough people usually tend to calculate sound energy for > different frequency bands. I wonder if I should do the same with amplitude > calculations. > There is also another notion of envelope of wave signal which is related > to variation of amplitude. I wonder if I should rather use this. > > The problem with amplitude in speech domain is that it's rather > undefined. > > Nat. > > >nataliya wrote: > >> I'm probably asking you very stupid question, > >> but i'm totally new to the field of Audio processing/analysis. I have > >> recording of someone talking and I need to compute few basic > >> characteristics for audio features: amplitude, phase, intensity. > > >> How do I start with it? If you know any useful online resources, > please > >> let me know. I'm using matlab a lot, if you have any library functions > that > >> do this job in matlab, please let me know. > > >> Thanks a lot for any help. > > >Nat, > > >You need to define exactly what you mean. Your might better understand > >your needs when you express them in terms that others can understand. > > >Points that puzzle me: > >How does amplitude differ from intensity? > >Phase of what relative to what? > > >Strictly, two signals must have the same frequency in order for their > >phases to be compared. Sometimes, conditions can be imposed to get > >around this, but they must be explicitly stated. > > >N.B. Matlab simplifies some calculations. With _good_ luck, it can apply > >*methods* you don't understand. Only by _dumb_ luck is it ever useful > >for solving *problems* you don't understand. > > >Jerry > >-- > >Engineering is the art of making what you want from things you can get. > >&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;
On Jul 28, 10:51&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> How does amplitude differ from intensity?
There is clearly a relation. However, try recording your voice saying a word that begins with an unvoiced sound, and look at the waveform. Something like "same". While the perceived intensity of the "s" and the "ame" may be similar, the amplitude of the "s" can be surprisingly lower than the amplitude of the "ame". Steve
On Jul 28, 10:59&#4294967295;am, "nataliya" <nadtok...@yahoo.com> wrote:

Hi Nat,

> It seems that there is a different between amplitute and intensity, > although both are related notions: > > http://www.indiana.edu/~emusic/acoustics/amplitude.htm > > I do not compare two signals. I just want to have characteristics of a > single audio voice signal.
As you have probably already guessed, there is not much one can do in the time domain. You can calculate the duration of signal, its peak value, etc, little simple things...but something like phase is going to be really difficult, because you will need a reference signal that is essentially identical to your sample signal with which to compare for phase difference. Not sure what you need this for, but if you are allowed to define your own parameters for the sampled signals, you'll do best to use frequency-domain parameters. Then you can calculate: 1. DFT of time domain signal. You can plot a spectrogram of signal which essentially represents power of signal as function of each frequency component contained therein, or power-spectral density. The Wikipedia page makes it look harder than it is (http:// en.wikipedia.org/wiki/Power_spectrum), though this is the hardest part, in fact. But then the rest is all fun easy math and fun. You can write rudimentary speech recognizer after you get past the DFT. Once you have done that, you can calculate: 2. Total energy E in the signal - integrate your DFT to get a sum E. Take modulus of each coefficient when integrating. 3. Linear relative intensity of sample signal energy versus reference signal energy Ei/Eo. 4. Logarithmic relative intensity of sample signal energy versus reference signal energy - log(Ei/Eo). Multiply this number and you have the very familiar measure of decibels - 40 dB = 4 bels = Ei must have been 10^4=10,000 times Eo. Note that, when calculating energy, you need to time-limit Si in time domain so that duration of Si is roughly equal to duration of So. Otherwise any long-duration signal will overwhelm reference signal So with energy, and short-duration signal will underwhelm So. 5. Mean-Square Error (http://en.wikipedia.org/wiki/Mean_squared_error) of current signal Si versus reference signal So - run along your bin of coefficients from your DFT's of Si and So, taking diference between two, squaring that difference, then find the entire average of those by dividing sqares of sums by N. Naturally, if two signals match exactly in all respects, MSE will be zero. This gives you an idea of how close the two signals are. You can first normalize the energies of Si and So by reducing each coefficient and certain amount dictated by Ei and Eo so that Ei == Eo before attempting to calculate MSE, which would obviously make more sense than making comparisons without regard to how loud speaker is speaking for Si. Intuitively, the smaller the MSE, the better the match. This is the very beginning of speech recognition. 6. Variance from average frequency. Find the mean frequency of your base signal So. Then calculate the variance from that signal. This will give you and idea of distribution of tones in speech. If your speaker is Tweety Bird chirping, variance should be very low. Techno music with drum and base will have high variance.
> Regarding matlab, I wouldn't ask questions here if I haven't tried to > understand what I need to implement. > Curiously enough people usually tend to calculate sound energy for > different frequency bands. I wonder if I should do the same with amplitude > calculations. > There is also another notion of envelope of wave signal which is related > to variation of amplitude. I wonder if I should rather use this. > > The problem with amplitude in speech domain is that it's rather > undefined.
Note that real digitized audio signals will often use a form of companding like u-law or A-law to "cheat" so that a much larger dynamic range of signal can be accomodated than if straight linear sampling were used: http://en.wikipedia.org/wiki/Companding http://en.wikipedia.org/wiki/%CE%9C-law http://en.wikipedia.org/wiki/A-law Also, aural sensitivity is logarithmic, which is why recomposition of a companded signal still sounds really good even, and why noise levels are given in decibels, but you probably knew that already. :) See: http://mysite.du.edu/~jcalvert/waves/ears.htm -Le Chaud Lapin-
On Jul 28, 11:55&#4294967295;pm, Le Chaud Lapin <jaibudu...@gmail.com> wrote:

> 5. Mean-Square Error (http://en.wikipedia.org/wiki/Mean_squared_error) > of current signal Si versus reference signal So - run along your bin > of coefficients from your DFT's of Si and So, taking diference between > two, squaring that difference, then find the entire average of those > by dividing sqares of sums by N.
I meant "by dividing the sum of the squares of the differences by N". -Le Chaud Lapin-

nataliya wrote:

> I'm probably asking you very stupid question,
Indeed.
> but i'm totally new to the field of Audio processing/analysis.
What do you mean by audio processing/analysis?
> I have > recording of someone talking and I need to compute few basic > characteristics for audio features: amplitude, phase, intensity. > How do I start with it?
Before getting into the minor technical details of implementation, please tell what kind of use you are trying to make of those parameters.
> If you know any useful online resources, please > let me know.
There are none. "Useful" and "Online" seem to be pretty much mutually exclusive.
> I'm using matlab a lot,
How much is a lot?
> if you have any library functions that > do this job in matlab, please let me know.
What job in particular?
> Thanks a lot for any help.
You are welcome. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com