// /// <summary> // /// Constructor where you can set the audio output mode. // /// </summary> // /// <param name="output"> // /// the audio data can either be played by eSpeak or passed back by the SynthCallback function. // /// </param> public ESpeakLibrary(espeak_AUDIO_OUTPUT output) { AudioOutputType = output; espeak_Initialize(output, 100, null, 0); espeak_SetSynthCallback(new SynthCallBackDelegate(OnCallBackReceived)); }
// /// <summary> // /// Constructor with extra options for sound output etc. // /// </summary> // /// <param name="output"> // /// the audio data can either be played by eSpeak or passed back by the SynthCallback function. // /// </param> // /// <param name="buflength"> // /// The length in mS of sound buffers passed to the SynthCallback function. // /// </param> // /// <param name="path"> // /// The directory which contains the espeak-data directory, or <see cref="null"/> for the default location. // /// </param> // /// <param name="options"> // /// bit 0: 1=allow espeakEVENT_PHONEME events. // /// bit 15: 1=don't exit if espeak_data is not found (used for --help) // /// </param> public ESpeakLibrary(espeak_AUDIO_OUTPUT output, int buflength, string path, int options) { AudioOutputType = output; espeak_Initialize(output, buflength, path, options); espeak_SetSynthCallback(new SynthCallBackDelegate(OnCallBackReceived)); }
/// <summary> /// Constructor that sets up eSpeak w/ default values that normally work for synchronous and /// immediate playback. /// </summary> public ESpeakLibrary() { AudioOutputType = espeak_AUDIO_OUTPUT.AUDIO_OUTPUT_SYNCH_PLAYBACK; espeak_Initialize(espeak_AUDIO_OUTPUT.AUDIO_OUTPUT_SYNCH_PLAYBACK, 100, null, 0); espeak_SetSynthCallback(new SynthCallBackDelegate(OnCallBackReceived)); }
private static extern int espeak_Initialize(espeak_AUDIO_OUTPUT output, int buflength, string path, int options);
// /// <summary> // /// Constructor with extra options for sound output etc. // /// </summary> // /// <param name="output"> // /// the audio data can either be played by eSpeak or passed back by the SynthCallback function. // /// </param> // /// <param name="buflength"> // /// The length in mS of sound buffers passed to the SynthCallback function. // /// </param> // /// <param name="path"> // /// The directory which contains the espeak-data directory, or <see cref="null"/> for the default location. // /// </param> // /// <param name="options"> // /// bit 0: 1=allow espeakEVENT_PHONEME events. // /// bit 15: 1=don't exit if espeak_data is not found (used for --help) // /// </param> public ESpeakLibrary(espeak_AUDIO_OUTPUT output, int buflength, string path, int options) { AudioOutputType = output; espeak_Initialize (output, buflength, path, options); espeak_SetSynthCallback (new SynthCallBackDelegate (OnCallBackReceived)); }
// /// <summary> // /// Constructor where you can set the audio output mode. // /// </summary> // /// <param name="output"> // /// the audio data can either be played by eSpeak or passed back by the SynthCallback function. // /// </param> public ESpeakLibrary(espeak_AUDIO_OUTPUT output) { AudioOutputType = output; espeak_Initialize (output, 100, null, 0); espeak_SetSynthCallback (new SynthCallBackDelegate (OnCallBackReceived)); }