-- a toolkit using a statistical algorithm for F0 estimation

Wei Chu and Abeer Alwan

What is SAFE
SAFE is a toolkit using a Statistical Algorithm for F0 Estimation for both clean and noisy speech. It is developed at the Speech Processing and Auditory Perception Laboratory at UCLA by Wei Chu and Prof. Abeer Alwan.

To reference the SAFE algorithm or toolkit, please use the following:
W. Chu and A. Alwan, "SAFE: a statistical algorithm for F0 estimation for both clean and noisy speech," Interspeech 2010, pp. 2590-2593.
Please reference SAFE when using the toolkit.

How SAFE works
SAFE consists of two modules: training models and F0 estimation. During training, SAFE loads wave files and their F0 ground truth files to statistically estimate models for noise robust F0 estimation. During F0 estimation, SAFE evaluates the likelihoods of F0 candidates on each frame given the trained models, then generates an F0 contour that maximizes the overall likelihoods.

How SAFE is built
SAFE is a toolkit written in C and built on the General Scientific Library (GSL), FFTW library, and another Speech Processing Assistant (SPA) library, which is developed by Wei Chu and Prof. Abeer Alwan. SAFE is released under the Less General Public License (LGPL). Everyone is encouraged to contribute to SAFE. The current version is 1.0.

Documentations and FAQs
The package for downloading has a brief tutorial explaining the softwares and packages that are required, the formats of input and output, and how to run the toolkit with example scripts. If you still encounter problems, feel free to let Wei know.

So far, we have only compiled and tested the Linux version of SAFE. We will probably developed a Windows version in the near future. To run SAFE, you need to have:
    • a 32-bits Fedora (≥12) or Ubuntu (≥8) system;
    • Gcc (≥4.4);
    • Automake (≥ 1.0);
    • Autoconf (≥ 2.0);
    • Libtool (≥ 2.2);
    • General scientific library (GSL) and its development package (≥ 1.14);
    • FFTW and its development package (≥ 3.2)
    • Sound eXchange (SoX) (≥ 14.0)
SAFE is written in C, you do not need Matlab.

start downloading

This research is supported in part by the NSF.

We would like to thank Georg Meyer for providing the KEELE database; CSTR lab at Edinburg University for providing another FDA database. The databases were used to evaluation the algorithm.

If you have any questions and suggestion, feel free to let us know. Wei Chu ( is maintaining the toolkit and website.  

last updated: May 20, 2011.