File Exchange

image thumbnail

A speech/music discriminator based on RMS and zero-crossings

version 1.5 (2.68 MB) by

This code implements a method for a speech/music discriminator based on RMS and zero-crossings.

32 Downloads

Updated

View License

This code is a simple implementation of [1], [2]. The function trmszc implements the main algorithm. The input of the method is a .wav file.
Instructions about the parameters of trmszc and how to run it, are given as comments in the start of trmszc.m.
It yields a sound segmentation and classification with 20 msec accuracy.
 
Classes: Music, Voice(Speech), Silence
You can use this software for non commercial purposes. Please, cite the articles [1], [2].

If you want to use the software for commercial purpose you have to contact with the authors of [1].

[1]. C. Panagiotakis and G. Tziritas, A speech/music discriminator based on
RMS and zero-crossings, IEEE Transactions on Multimedia, Vol. 7, No. 1, Feb. 2005.

[2] C. Panagiotakis and G. Tziritas, A Speech/Music Discriminator using
RMS and Zero-crossings, European Signal Processing Conference, 2002.

For more details visit: www.csd.uoc.gr/~cpanag
www.csd.uoc.gr/~tziritas

Comments and Ratings (7)

Thanks for the suggestion, the code has been updated now including only the second for

ming qiu

Dear, Costas
I was going through your source code and confused with the following scope:

for i=2:l-1,
   P(i-1) =(1-omiot2(i-1))*(1-omiot1(i-1)+1-omiot1(i))*(1-omiot2(i-1));
end

for i=2:l-1,
   P(i-1) =(1-omiot2(i-1));
end

we can see that P[] indeed updated by (1-omiot2(i-1)), but why make it updated with (1-omiot2(i-1))*(1-omiot1(i-1)+1-omiot1(i))*(1-omiot2(i-1)) just above it which is not necessary and expends the computation ?

juping ma

Hello,my dear friend.Now i can run it and get two
picture as result,but i can not understand many detail.Can you help me?My QQ is 2268326043,if you have time,contracting me! When you contract me ,remarking "matlab",thank you!!

sathya seelan

Try this

[y,fs]=wavread(filename);
zc = 0;
for i=2:length(y)
   if y(i)*y(i-1) <= 0,
      zc = zc+1;
   end,
end,
disp(zc);

juping ma

I have a question.Can not these code run?
I have tried many times,but i can not get right result.Can you help me ?

It computes the number of number of times that the sign of the given signal y changes (from positive to negative or from negative to positive).

You can find more details in
[1]. C. Panagiotakis and G. Tziritas, A speech/music discriminator based on RMS and zero-crossings, IEEE Transactions on Multimedia, Vol. 7, No. 1, Feb. 2005.

sathya seelan

what does the following code mean.?

%Computes the number of Zero_Crossings of signal y
function [zc] = Zero_Crossings(y)

zc = 0;
for i=2:length(y),
   if y(i)*y(i-1) < 0,
      zc = zc+1;
   end,
end,

   

Updates

1.5

Code update

1.5

Tags

1.4

tags update

1.3

Update of the Screenshot and the figures of the function trmszc

1.2

description update

1.1

Update the Description and tags and the and comments on trmszc.m.

MATLAB Release
MATLAB 7.14 (R2012a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video