next GUI Application Formant-Filter Based Vowel Synthesis
up Formant-Filter Based Vowel Synthesis Examples
previous CLM Formant-Filter Based Vowel Synthesis



STK Formant-Filter Based Vowel Synthesis

The Synthesis Tool Kit (STK), a CCRMA-created collection of C++ classes for the synthesis and processing of musical instrument sounds, contains a C++ class VoicForm for the synthesis of vowel sounds based on formant filtering of a band-limited impulse train.

The following short C++ program generates a short clip of the vowel /i/:

#include "VoicForm.h"
#include "WvOut.h"

#define OUTPUT_LENGTH_SEC       5
#define NUM_OUTPUT              (Stk::sampleRate()*OUTPUT_LENGTH_SEC)

#define VOWEL_FREQ              75.0
#define VOWEL_AMP               1.0

int main(void)
{
  WvOut wvo("test_vowel.wav");
  VoicForm vf;

  vf.noteOn(VOWEL_FREQ, VOWEL_AMP);
  vf.speak();

  for (int i=0; i<NUM_OUTPUT; i++)
  {
    wvo.tick(vf.tick());
  }

  wvo.closeFile();

  return 0;
}

The NoteOn() member of VoicForm sets the frequency (in Hz) (default is $75$ Hz) and amplitude (a non-dimensional, linear value) of the vowel. Next VoicForm::speak() activates vowel sound output with subsequent calls to VoicForm::tick() (tick() is the name of the method given to most STK classes that accept or produce audio samples). Finally, the for loop produces the vowel output samples and stores them in an STK WAV file object, wvo.

The WAV file produced by this program may be heard at
http://www-ccrma.stanford.edu/~rjc/audio/speech/vowel/stk_vowel/rjc_stk_vowel_ex.wav.


next GUI Application Formant-Filter Based Vowel Synthesis
up Formant-Filter Based Vowel Synthesis Examples
previous CLM Formant-Filter Based Vowel Synthesis

``Audio Speech Research Note'', Ryan J. Cassidy, published electronically by author, July 2003.
Download PDF version (audio_speech.pdf)
Download compressed PostScript version (audio_speech.ps.gz)

Copyright © 2003-11-28 by Ryan J. Cassidy.
Please email errata, comments, and suggestions to Ryan J. Cassidy <ryanc@ieee.org>
Stanford University