I want to determine whether a speech frame is voiced/unvoiced. Out of many methods found while searching, one method said find energy of the frame and if it is above a certain threshold, mark it as voiced. Now, my question is how should I determine this 'threshold value'? Is it by trial and error or are there any set of rules?

In my attempts, I resorted to a simple idea of looking at the energy plots and setting a threshold value accordingly. It served me well, but I want to know whether it was just beginner's luck.

  • You might benefit from these responses as well. Can I please ask what sort of setting you are dealing with? (i.e. Is this a talk-show kind of environment of open air recordings?) – A_A Dec 6 at 13:04
  • We are recording in a normal room, I mean not sound-proofed or anything. Just like a daily life situation. – Anand Mohan Dec 6 at 16:08
up vote 0 down vote accepted

Well, that is energy detection for you; setting the threshold is a long-discussed (and not too abstract) problem when receiving OOK (on-off-keying).

The threshold you choose will be a tradeoff between missed detections and false alarms.

You'll hence will need to have a probability density function of your signal of interest (voice energy per frame) and of your noise (noise energy per frame).

You could then either set a constant false alarm rate and set your threshold as low as possible to attain that, or a constant detection probability and live with the number of false alarms that you get.

The reason I asked about the environment of the recording is because if you have a well controlled situation (e.g. a talk-show, an interview that takes place in a studio, a discussion in a relatively quiet room and other similar situations), you can take your power estimates from every frame, create a histogram of those values and use that to find the threshold value that would then discriminate your frames between voiced and un-voiced.

This is similar to Otsu's method and it is important to have a well controlled situation for the assumption of "...a bimodal histogram..." to be valid.

Hope this helps.

  • But isn't it that unvoiced frames might have more power than voiced frames? I'm not sure energy-based methods are optimum for this task. However, it's always a good idea to try it... – applesoup Dec 6 at 19:53
  • @applesoup The original question was stated as: "...how should I determine this 'threshold value'? Is it by trial and error or are there any set of rules?". This answer addresses that part. What you are asking in this comment requires a classifier. It would be useful to amend your question to include all relevant information for more accurate answers. – A_A Dec 7 at 9:35
  • @a-a I see - I missed the OP's original question, which is perfectly addressed by your answer. However, I believe the process of thresholding the frame energies to discriminate between voiced and unvoiced frames can also be seen as a classifier, isn't it? – applesoup Dec 7 at 11:49
  • @applesoup I am sorry, I seem to have taken your comment as coming from the OP. Yes, that would be a primitive VAD under the assumption that the voiced part is the dialogue going on. What I think you may be suggesting is a way of understanding if a more coherent signal is being voiced or it could be any random sound. I think that what you are suggesting would still need a bit of "classification" because Autocorrelation would tend to latch on the fundamental which is different between genders. – A_A Dec 7 at 12:08
  • I'm beginning to have a slight feeling there might be some confusion regarding the term "voiced". My interpretation is related to phonetic properties of a speech sound and maybe in the context here it is interpreted as the presence of speech in general (containing voiced and unvoiced sounds)... Is my feeling right? – applesoup Dec 7 at 12:19

An alternative to a pure energy-based detector is to analyze the height of the peak of the normalized autocorrelation function closest to zero.

This answer explains a way to compute a simple periodicity coefficient which should indicate whether a segment is voiced or unvoiced.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.