~ubuntu-branches/ubuntu/oneiric/espeak/oneiric

« back to all changes in this revision

Viewing changes to platforms/windows/windows_dll/src/speak_lib.h

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2011-05-04 11:25:46 UTC
  • mfrom: (1.1.24 upstream) (5.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110504112546-ykijzihgc7ybgzn2
Tags: 1.45.04-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Add gbp.conf for use with git buildpackage
  - Update the explanation of the -b command-line flag in the espeak manpage

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
/* This is the header file for the library version of espeak */
25
25
/*                                                           */
26
26
/*************************************************************/
 
27
#define ESPEAK_API __declspec(dllexport)
 
28
 
27
29
 
28
30
#include <stdio.h>
29
31
#include <stddef.h>
157
159
        EE_NOT_FOUND=2
158
160
} espeak_ERROR;
159
161
 
 
162
#define espeakINITIALIZE_PHONEME_EVENTS 0x0001
 
163
#define espeakINITIALIZE_DONT_EXIT     0x8000
160
164
 
161
165
#ifdef __cplusplus
162
166
extern "C"
163
167
#endif
164
 
int espeak_Initialize(espeak_AUDIO_OUTPUT output, int buflength, const char *path, int options);
 
168
ESPEAK_API int espeak_Initialize(espeak_AUDIO_OUTPUT output, int buflength, const char *path, int options);
165
169
/* Must be called before any synthesis functions are called.
166
170
   output: the audio data can either be played by eSpeak or passed back by the SynthCallback function.
167
171
 
169
173
 
170
174
   path: The directory which contains the espeak-data directory, or NULL for the default location.
171
175
 
172
 
   options: bit 0: 1=allow espeakEVENT_PHONEME events.
173
 
 
 
176
   options: bit 0:  1=allow espeakEVENT_PHONEME events.
 
177
            bit 15: 1=don't exit if espeak_data is not found (used for --help)
174
178
 
175
179
   Returns: sample rate in Hz, or -1 (EE_INTERNAL_ERROR).
176
180
*/
180
184
#ifdef __cplusplus
181
185
extern "C"
182
186
#endif
183
 
void espeak_SetSynthCallback(t_espeak_callback* SynthCallback);
 
187
ESPEAK_API void espeak_SetSynthCallback(t_espeak_callback* SynthCallback);
184
188
/* Must be called before any synthesis functions are called.
185
189
   This specifies a function in the calling program which is called when a buffer of
186
190
   speech sound data has been produced. 
208
212
#ifdef __cplusplus
209
213
extern "C"
210
214
#endif
211
 
void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*));
 
215
ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*));
212
216
/* This function may be called before synthesis functions are used, in order to deal with
213
217
   <audio> tags.  It specifies a callback function which is called when an <audio> element is
214
218
   encountered and allows the calling program to indicate whether the sound file which
249
253
#ifdef __cplusplus
250
254
extern "C"
251
255
#endif
252
 
espeak_ERROR espeak_Synth(const void *text,
 
256
ESPEAK_API espeak_ERROR espeak_Synth(const void *text,
253
257
        size_t size,
254
258
        unsigned int position,
255
259
        espeak_POSITION_TYPE position_type,
305
309
#ifdef __cplusplus
306
310
extern "C"
307
311
#endif
308
 
espeak_ERROR espeak_Synth_Mark(const void *text,
 
312
ESPEAK_API espeak_ERROR espeak_Synth_Mark(const void *text,
309
313
        size_t size,
310
314
        const char *index_mark,
311
315
        unsigned int end_position,
329
333
#ifdef __cplusplus
330
334
extern "C"
331
335
#endif
332
 
espeak_ERROR espeak_Key(const char *key_name);
 
336
ESPEAK_API espeak_ERROR espeak_Key(const char *key_name);
333
337
/* Speak the name of a keyboard key.
334
338
   If key_name is a single character, it speaks the name of the character.
335
339
   Otherwise, it speaks key_name as a text string.
343
347
#ifdef __cplusplus
344
348
extern "C"
345
349
#endif
346
 
espeak_ERROR espeak_Char(wchar_t character);
 
350
ESPEAK_API espeak_ERROR espeak_Char(wchar_t character);
347
351
/* Speak the name of the given character 
348
352
 
349
353
   Return: EE_OK: operation achieved 
425
429
#ifdef __cplusplus
426
430
extern "C"
427
431
#endif
428
 
int espeak_GetParameter(espeak_PARAMETER parameter, int current);
 
432
ESPEAK_API int espeak_GetParameter(espeak_PARAMETER parameter, int current);
429
433
/* current=0  Returns the default value of the specified parameter.
430
434
   current=1  Returns the current value of the specified parameter, as set by SetParameter()
431
435
*/
433
437
#ifdef __cplusplus
434
438
extern "C"
435
439
#endif
436
 
espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
 
440
ESPEAK_API espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
437
441
/* Specified a list of punctuation characters whose names are to be spoken when the
438
442
   value of the Punctuation parameter is set to "some".
439
443
 
448
452
#ifdef __cplusplus
449
453
extern "C"
450
454
#endif
451
 
void espeak_SetPhonemeTrace(int value, FILE *stream);
 
455
ESPEAK_API void espeak_SetPhonemeTrace(int value, FILE *stream);
452
456
/* Controls the output of phoneme symbols for the text
453
457
   value=0  No phoneme output (default)
454
458
   value=1  Output the translated phoneme symbols for the text
461
465
#ifdef __cplusplus
462
466
extern "C"
463
467
#endif
464
 
void espeak_CompileDictionary(const char *path, FILE *log, int flags);
 
468
ESPEAK_API void espeak_CompileDictionary(const char *path, FILE *log, int flags);
465
469
/* Compile pronunciation dictionary for a language which corresponds to the currently
466
470
   selected voice.  The required voice should be selected before calling this function.
467
471
 
514
518
#ifdef __cplusplus
515
519
extern "C"
516
520
#endif
517
 
const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
 
521
ESPEAK_API const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
518
522
/* Reads the voice files from espeak-data/voices and creates an array of espeak_VOICE pointers.
519
523
   The list is terminated by a NULL pointer
520
524
 
526
530
#ifdef __cplusplus
527
531
extern "C"
528
532
#endif
529
 
espeak_ERROR espeak_SetVoiceByName(const char *name);
 
533
ESPEAK_API espeak_ERROR espeak_SetVoiceByName(const char *name);
530
534
/* Searches for a voice with a matching "name" field.  Language is not considered.
531
535
   "name" is a UTF8 string.
532
536
 
539
543
#ifdef __cplusplus
540
544
extern "C"
541
545
#endif
542
 
espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
 
546
ESPEAK_API espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
543
547
/* An espeak_VOICE structure is used to pass criteria to select a voice.  Any of the following
544
548
   fields may be set:
545
549
 
559
563
#ifdef __cplusplus
560
564
extern "C"
561
565
#endif
562
 
espeak_VOICE *espeak_GetCurrentVoice(void);
 
566
ESPEAK_API espeak_VOICE *espeak_GetCurrentVoice(void);
563
567
/* Returns the espeak_VOICE data for the currently selected voice.
564
568
   This is not affected by temporary voice changes caused by SSML elements such as <voice> and <s>
565
569
*/
567
571
#ifdef __cplusplus
568
572
extern "C"
569
573
#endif
570
 
espeak_ERROR espeak_Cancel(void);
 
574
ESPEAK_API espeak_ERROR espeak_Cancel(void);
571
575
/* Stop immediately synthesis and audio output of the current text. When this
572
576
   function returns, the audio output is fully stopped and the synthesizer is ready to
573
577
   synthesize a new message.
580
584
#ifdef __cplusplus
581
585
extern "C"
582
586
#endif
583
 
int espeak_IsPlaying(void);
 
587
ESPEAK_API int espeak_IsPlaying(void);
584
588
/* Returns 1 if audio is played, 0 otherwise.
585
589
*/
586
590
 
587
591
#ifdef __cplusplus
588
592
extern "C"
589
593
#endif
590
 
espeak_ERROR espeak_Synchronize(void);
 
594
ESPEAK_API espeak_ERROR espeak_Synchronize(void);
591
595
/* This function returns when all data have been spoken.
592
596
   Return: EE_OK: operation achieved 
593
597
           EE_INTERNAL_ERROR.
596
600
#ifdef __cplusplus
597
601
extern "C"
598
602
#endif
599
 
espeak_ERROR espeak_Terminate(void);
 
603
ESPEAK_API espeak_ERROR espeak_Terminate(void);
600
604
/* last function to be called.
601
605
   Return: EE_OK: operation achieved 
602
606
           EE_INTERNAL_ERROR.
606
610
#ifdef __cplusplus
607
611
extern "C"
608
612
#endif
609
 
const char *espeak_Info(void* ptr);
 
613
ESPEAK_API const char *espeak_Info(const char **path_data);
610
614
/* Returns the version number string.
611
 
   The parameter is for future use, and should be set to NULL
 
615
   path_data  returns the path to espeak_data
612
616
*/
613
617
#endif