how to find short pause in a sentence ?

can any1 help me with matlab code for finding pause in a sentence!!! for example in the sentence She was dancing,singing ,laughing in the party. Pauses are found after dancing,singing and laughing.how do i find it with matlab code pls help.

댓글 수: 2

Daniel Shub
Daniel Shub 2013년 6월 3일
What is your definition of when a pause occurs?
David Sanchez
David Sanchez 2013년 6월 4일
Do you mean blank spaces?

댓글을 달려면 로그인하십시오.

답변 (1개)

Iain
Iain 2013년 6월 3일

0 개 추천

If you have the sentence as a string: eg.
Str = 'She was dancing, singing, laughing in the party.';
You can get the index of each comma (which I think you mean by pause), with:
pauses = find(Str == ',');
There are better ways, but that works.

댓글 수: 5

Sony
Sony 2013년 6월 3일
Thanks lain,but i need to find short pauses in a sentence which does not have commas.for eg: hi im jain after hi there is a short pause but there is no comma to represent it. so how can i find these short pauses without using commas
Iain
Iain 2013년 6월 3일
How are you denoting a pause?
Are you dealing with recorded speech (audio)?
Matt Kindig
Matt Kindig 2013년 6월 3일
편집: Matt Kindig 2013년 6월 3일
Sony,
What you are describing is broadly described as "natural language processing" and is a huge (and not-trivial) field of research. Figuring out a general algorithm to find pauses in a stream of text is not a simple matter at all. You'd be better off using an existing NLP toolbox rather than trying to figure out your own solution. This isn't my field, but a quick Google search brought up this: https://amplab.cs.berkeley.edu/2012/05/05/an-nlp-library-for-matlab/-- that might be a good place to start.
Sony
Sony 2013년 6월 4일
yes lain,im dealing with recorded speech there varieties of recorded speech normal fast and slow
Ok, in that case, if you threshold the audio stream, you should be able to find periods of below the threshold.
Pseudocode:
Loud = this is when people are talking
Quiet = this is when people are not talking
Threshold = (Loud + Quiet) / 2
Recorded_text = [Quiet Loud Quiet Loud Quiet Quiet Quiet Loud]
Thresholded_text = Recorded_text > +Threshold & Recorded_text < -Threshold
e.g. Thresholded = [false true false true false false false true]
Each pause, no matter how small will be recorded as a stream of "false", and depending how the recording is performed, you'll find "false" in the middle of speech as well.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2013년 6월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by