This repository has been archived by the owner on Feb 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
speechdsynthesisdriver.h
86 lines (75 loc) · 2.85 KB
/
speechdsynthesisdriver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* GNOME Speech - Speech services for the GNOME desktop
*
* Copyright 2002 Sun Microsystems Inc.
* Copyright 2005 Brailcom, o.p.s.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* speechdsynthesisdriver.h: Definition of the SpeechdSynthesisDriver
* object-- a GNOME Speech driver for the Speechd
* Speech Synthesis System (implementation in
* speechdsynthesisdriver.c)
*
*/
#ifndef __SPEECHD_SYNTHESIS_DRIVER_H_
#define __SPEECHD_SYNTHESIS_DRIVER_H_
#include <bonobo/bonobo-object.h>
#include <gnome-speech/gnome-speech.h>
#include "speechdspeaker.h"
#define SPEECHD_SYNTHESIS_DRIVER_TYPE (speechd_synthesis_driver_get_type ())
#define SPEECHD_SYNTHESIS_DRIVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPEECHD_SYNTHESIS_DRIVER_TYPE, SpeechdSynthesisDriver))
#define SPEECHD_SYNTHESIS_DRIVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPEECHD_SYNTHESIS_DRIVER_TYPE, SpeechdSynthesisDriverClass))
#define IS_SPEECHD_SYNTHESIS_DRIVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPEECHD_SYNTHESIS_DRIVER_TYPE))
#define IS_SPEECHD_SYNTHESIS_DRIVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPEECHD_SYNTHESIS_DRIVER_TYPE))
typedef struct {
BonoboObject parent;
pid_t pid;
gchar *version;
gboolean initialized;
SpeechdSpeaker *last_speaker;
int sock;
int pipe;
GIOChannel *channel_sock;
GIOChannel *channel_pipe;
gboolean is_shutting_up;
gboolean is_speaking;
GSList *list;
gboolean is_querying;
gint crt_id;
GSList *crt_clbs;
int queue_length;
} SpeechdSynthesisDriver;
typedef struct {
BonoboObjectClass parent_class;
POA_GNOME_Speech_SynthesisDriver__epv epv;
} SpeechdSynthesisDriverClass;
GType
speechd_synthesis_driver_get_type (void);
SpeechdSynthesisDriver *
speechd_synthesis_driver_new (void);
gint
speechd_synthesis_driver_say (SpeechdSynthesisDriver *d,
SpeechdSpeaker *s,
gchar *text);
gboolean
speechd_synthesis_driver_stop (SpeechdSynthesisDriver *d);
gboolean
speechd_synthesis_driver_is_speaking (SpeechdSynthesisDriver *d);
void
speechd_synthesis_driver_say_raw (SpeechdSynthesisDriver *d,
gchar *text);
#endif /* __SPEECHD_SYNTHESIS_DRIVER_H_ */