tts-api-provider
10 years agoTwo additional makefiles. master
Hynek Hanke [Wed, 19 Nov 2008 18:06:57 +0000 (19:06 +0100)]
Two additional makefiles.

10 years agoReorganization and installation
Hynek Hanke [Wed, 19 Nov 2008 17:15:27 +0000 (18:15 +0100)]
Reorganization and installation

Directory structure was reorganized to allow
for new installation method based on autotools.
Also standard files like AUTHORS, BUGS, INSTALL
etc. have been creted.

10 years ago*** empty log message *** origin
hanke [Wed, 7 May 2008 08:27:33 +0000 (08:27 +0000)]
*** empty log message ***

10 years ago(ErrorDriverBusy): New class.
hanke [Wed, 7 May 2008 08:26:25 +0000 (08:26 +0000)]
(ErrorDriverBusy): New class.

10 years ago(SHMConnection): New class.
hanke [Wed, 7 May 2008 08:26:10 +0000 (08:26 +0000)]
(SHMConnection): New class.

10 years ago(TCPConnection.__init__): Shared memmory 'shm'
hanke [Wed, 7 May 2008 08:25:46 +0000 (08:25 +0000)]
(TCPConnection.__init__): Shared memmory 'shm'
added to supported communication methods.

10 years ago(TIMESTAMP): New macro.
hanke [Wed, 7 May 2008 08:24:42 +0000 (08:24 +0000)]
(TIMESTAMP): New macro.
(DBG): Only do debugging output if TTSPI_DRIVER_DEBUGGING is
true.

10 years ago(driver_audio_connection_init): Create stream
hanke [Wed, 7 May 2008 08:23:21 +0000 (08:23 +0000)]
(driver_audio_connection_init): Create stream
in write mode.
(driver_send_audio): Removed '=' signs in protocol.

10 years ago(say_text_asynchro): Renamed
hanke [Wed, 7 May 2008 08:22:21 +0000 (08:22 +0000)]
(say_text_asynchro): Renamed
from say_text_asynchro.  This function is now called from a
separate thread (this is the fundamental difference, not the
change of name) because calling it synchronously proved to be slow.

10 years ago(main): Reposition argv arguments since
hanke [Wed, 7 May 2008 08:20:51 +0000 (08:20 +0000)]
(main): Reposition argv arguments since
the first argument is now communication_method.

10 years ago(Controller.retrieve_data.read_item): Bugfix for
hanke [Wed, 7 May 2008 08:19:42 +0000 (08:19 +0000)]
(Controller.retrieve_data.read_item): Bugfix for
correct procesing of mesage_end event.

10 years ago(RetrievalSocket.send_data_block): Handle the case when
hanke [Wed, 7 May 2008 08:18:29 +0000 (08:18 +0000)]
(RetrievalSocket.send_data_block): Handle the case when
there are no data to send, just events and index marks.
(DriverLogger.__init__): New class.
(main_loop): Handle shared memory 'shm' communication mode.

10 years ago(Provider.say_text): Additional debugging messages.
hanke [Wed, 7 May 2008 08:17:01 +0000 (08:17 +0000)]
(Provider.say_text): Additional debugging messages.
(Provider.say_icon): Do not check for current_message_id unless mutex protected.
(Provider.__init__): Launch driver in with either 'pipe' or 'shm' communication
according to configuration

10 years ago(Logging.init_stage2): New level: timestamp.
hanke [Wed, 7 May 2008 08:13:26 +0000 (08:13 +0000)]
(Logging.init_stage2): New level: timestamp.

10 years ago(Configuration): timestamp_priority: new option.
hanke [Wed, 7 May 2008 08:13:19 +0000 (08:13 +0000)]
(Configuration): timestamp_priority: new option.
(Configuration): Different format for output modules configuration.

10 years ago*** empty log message ***
hanke [Mon, 5 May 2008 15:04:22 +0000 (15:04 +0000)]
*** empty log message ***

11 years ago(Basic Usage of TTS API): New section.
hanke [Mon, 21 Jan 2008 13:05:14 +0000 (13:05 +0000)]
(Basic Usage of TTS API): New section.

11 years ago*** empty log message ***
hanke [Mon, 21 Jan 2008 13:05:05 +0000 (13:05 +0000)]
*** empty log message ***

11 years agoRenamed back to provider.
hanke [Fri, 21 Dec 2007 15:03:51 +0000 (15:03 +0000)]
Renamed back to provider.

11 years ago*** empty log message ***
hanke [Fri, 21 Dec 2007 15:03:38 +0000 (15:03 +0000)]
*** empty log message ***

11 years ago(SocketConnection._read_line): Raise
hanke [Fri, 21 Dec 2007 15:00:19 +0000 (15:00 +0000)]
(SocketConnection._read_line): Raise
IOError on socket.error exception.

11 years ago(TCPConnection.close): New method.
hanke [Fri, 21 Dec 2007 14:59:38 +0000 (14:59 +0000)]
(TCPConnection.close): New method.

11 years agoNew file.
hanke [Fri, 21 Dec 2007 14:55:22 +0000 (14:55 +0000)]
New file.

11 years agoThread objects are now global variables.
hanke [Wed, 19 Dec 2007 13:16:03 +0000 (13:16 +0000)]
Thread objects are now global variables.
(CtrlRequest): New event: 'quit'

11 years ago*** empty log message ***
hanke [Fri, 23 Nov 2007 09:22:47 +0000 (09:22 +0000)]
*** empty log message ***

11 years ago(Provider.__init__): Use
hanke [Fri, 23 Nov 2007 09:22:38 +0000 (09:22 +0000)]
(Provider.__init__): Use
os.path.join instead of string concatenation to construct
path to module logs.

11 years ago(Configuration.__init__): Use
hanke [Fri, 23 Nov 2007 09:20:59 +0000 (09:20 +0000)]
(Configuration.__init__): Use
os.path.join instead of string concatenation to construct
log_path

11 years ago*** empty log message ***
hanke [Wed, 21 Nov 2007 13:38:33 +0000 (13:38 +0000)]
*** empty log message ***

11 years ago(Provider.__init__): If a module
hanke [Wed, 21 Nov 2007 13:38:12 +0000 (13:38 +0000)]
(Provider.__init__): If a module
could not be loaded, report the error in logfile and continue
with others.

11 years ago*** empty log message ***
hanke [Wed, 21 Nov 2007 12:57:43 +0000 (12:57 +0000)]
*** empty log message ***

11 years agocan_parse_ssml -> message_format
hanke [Wed, 21 Nov 2007 12:57:24 +0000 (12:57 +0000)]
can_parse_ssml -> message_format
(_SSIP_Connection._readline): Removed raising error if received only
0 bytes on a line (which is ok if the line is empty...).

11 years agocan_parse_ssml -> message_format
hanke [Wed, 21 Nov 2007 12:57:10 +0000 (12:57 +0000)]
can_parse_ssml -> message_format

11 years agoNew file -- eSpeak driver.
hanke [Wed, 21 Nov 2007 12:56:25 +0000 (12:56 +0000)]
New file -- eSpeak driver.

11 years agoNew file.
hanke [Wed, 21 Nov 2007 12:55:10 +0000 (12:55 +0000)]
New file.

11 years ago(TCPConnection.raise_event): Typo.
hanke [Wed, 21 Nov 2007 12:53:19 +0000 (12:53 +0000)]
(TCPConnection.raise_event): Typo.

11 years ago* src/ttsapi/connection.py (PipeConnection._read_line): Removed
hanke [Wed, 21 Nov 2007 12:52:43 +0000 (12:52 +0000)]
* src/ttsapi/connection.py (PipeConnection._read_line): Removed
IOError on empty line read.
(SocketConnection.close): Close the socket after shutdown.
(PipeConnection._read_line): Do not strip trailing newline.
(Connection.receive_line): Strip trailing newline here.
(Connection._recv_message): Strip trailing newline on client side
as well.
(PipeConnection._read_line): Raise IOError on all data reading errors.

* src/ttsapi/connection.py (PipeConnection._read_line): IOError on
empty message receival is back.

* src/ttsapi/connection.py (PipeConnection._read_line): Do not raise IOError
if received empty line.

11 years ago(TCPConnection._report_error): Additional
hanke [Wed, 21 Nov 2007 12:52:05 +0000 (12:52 +0000)]
(TCPConnection._report_error): Additional
debugging, correct concatenation of error.data into err_detail.

11 years ago(DriverCapabilities): can_parse_ssml ->
hanke [Wed, 21 Nov 2007 12:50:04 +0000 (12:50 +0000)]
(DriverCapabilities): can_parse_ssml ->
message_format

11 years ago(Core): Formatting.
hanke [Wed, 21 Nov 2007 12:42:40 +0000 (12:42 +0000)]
(Core): Formatting.

11 years ago(Provider.say_text): Emulate plain from
hanke [Wed, 21 Nov 2007 12:42:07 +0000 (12:42 +0000)]
(Provider.say_text): Emulate plain from
SSML and SSML from plain.

11 years ago*** empty log message ***
hanke [Wed, 21 Nov 2007 12:39:47 +0000 (12:39 +0000)]
*** empty log message ***

11 years ago* src/provider/audio.py (PlaybackInfo):
hanke [Wed, 21 Nov 2007 12:39:19 +0000 (12:39 +0000)]
* src/provider/audio.py (PlaybackInfo):

* src/provider/audio.py (event_list): Now protected with event_list_lock.
(Audio.play): Interrupt event_sleeper.

11 years agoDon't create file logger in the server when requested to log to stdout
pdm [Sat, 17 Nov 2007 21:12:21 +0000 (21:12 +0000)]
Don't create file logger in the server when requested to log to stdout

11 years agoAccept unicode instances in client's say_text
pdm [Sat, 17 Nov 2007 21:12:11 +0000 (21:12 +0000)]
Accept unicode instances in client's say_text

11 years ago*** empty log message ***
hanke [Wed, 17 Oct 2007 08:36:14 +0000 (08:36 +0000)]
*** empty log message ***

11 years agoMoved from src/provider.
hanke [Wed, 17 Oct 2007 08:35:50 +0000 (08:35 +0000)]
Moved from src/provider.

11 years ago* src/provider/drivers/driver.py: Moved from src/provider.
hanke [Wed, 17 Oct 2007 08:35:41 +0000 (08:35 +0000)]
* src/provider/drivers/driver.py: Moved from src/provider.

11 years agoDrivers moved to drivers/
hanke [Wed, 17 Oct 2007 08:34:23 +0000 (08:34 +0000)]
Drivers moved to drivers/

11 years agoMoved to src/provider/drivers/
hanke [Wed, 17 Oct 2007 08:33:59 +0000 (08:33 +0000)]
Moved to src/provider/drivers/

11 years agoMoved to src/provider/drivers/driver.py
hanke [Wed, 17 Oct 2007 08:33:47 +0000 (08:33 +0000)]
Moved to src/provider/drivers/driver.py

11 years ago(Device Driver Implementation): New section.
hanke [Wed, 17 Oct 2007 08:30:40 +0000 (08:30 +0000)]
(Device Driver Implementation): New section.

11 years ago@function -> @code, @textit -> @code
hanke [Fri, 12 Oct 2007 09:54:16 +0000 (09:54 +0000)]
@function -> @code, @textit -> @code

11 years ago*** empty log message ***
hanke [Fri, 12 Oct 2007 09:54:07 +0000 (09:54 +0000)]
*** empty log message ***

11 years ago*** empty log message ***
hanke [Fri, 12 Oct 2007 08:38:01 +0000 (08:38 +0000)]
*** empty log message ***

11 years ago(Core.register_callback): New function.
hanke [Fri, 12 Oct 2007 08:37:45 +0000 (08:37 +0000)]
(Core.register_callback): New function.

11 years agoNew file.
hanke [Fri, 12 Oct 2007 08:19:32 +0000 (08:19 +0000)]
New file.

11 years ago*** empty log message ***
hanke [Fri, 12 Oct 2007 08:17:13 +0000 (08:17 +0000)]
*** empty log message ***

11 years ago(messages_in_playback_lock): Added new
hanke [Fri, 12 Oct 2007 08:17:04 +0000 (08:17 +0000)]
(messages_in_playback_lock): Added new
lock. Apply this lock to all accesses to messages_in_playback.

11 years ago('Configuration
hanke [Fri, 12 Oct 2007 08:16:57 +0000 (08:16 +0000)]
('Configuration
'available_drivers'): Typo in docstring.
(Configuration 'available_drivers'): Added configuration for
speech dispatcher modules.
(Configuration 'default_driver'): Docstring added.

11 years ago* src/provider/driver.py (Core.quit): Rewritten.
hanke [Fri, 12 Oct 2007 08:11:59 +0000 (08:11 +0000)]
* src/provider/driver.py (Core.quit): Rewritten.
(EventCallback): New function.
(main_loop): Handle ttsapi.server.CliengGone exception

* src/provider/driver.py (Controller.run): Added new event 'quit'

11 years ago(FestivalConnection.close): New function.
hanke [Fri, 12 Oct 2007 08:11:53 +0000 (08:11 +0000)]
(FestivalConnection.close): New function.
(Core.quit): New function.
(Core.drivers): Driver version incremented.
(Core.driver_capabilities): Punctuation detail marked as not
supported.

11 years ago(Provider.__init__): Append a unique
hanke [Fri, 12 Oct 2007 08:11:48 +0000 (08:11 +0000)]
(Provider.__init__): Append a unique
string to every driver log filename.
(Provider.__init__): Fallback on other available module if
the default module is not available.

11 years ago(main): Added debug messages.
hanke [Fri, 12 Oct 2007 08:11:43 +0000 (08:11 +0000)]
(main): Added debug messages.

11 years ago(VoiceTest.test_punctuation_detail): Only
hanke [Fri, 12 Oct 2007 08:11:36 +0000 (08:11 +0000)]
(VoiceTest.test_punctuation_detail): Only
request punctuation detail settings if supported by the driver.

11 years ago(TCPConnection.__init__): Init
hanke [Fri, 12 Oct 2007 08:11:31 +0000 (08:11 +0000)]
(TCPConnection.__init__): Init
of self._callbacks moved here from the class body.
(TCPConnection.raise_event): Handle parameters of different
events correctly.

11 years ago* src/ttsapi/connection.py (PipeConnection._read_line): Raise
hanke [Fri, 12 Oct 2007 08:11:25 +0000 (08:11 +0000)]
* src/ttsapi/connection.py (PipeConnection._read_line): Raise
IOError when 0 bytes is read.o

* src/ttsapi/connection.py (PipeConnection._read_line): If 0 bytes
is read, raise IOError.
(SocketConnection.read_data): Handle the situation when more
data is waiting in the _buffer than what we need.

11 years ago* src/ttsapi/errors.py (ErrorDriverNotAvailable): New error class.
hanke [Fri, 12 Oct 2007 08:11:19 +0000 (08:11 +0000)]
* src/ttsapi/errors.py (ErrorDriverNotAvailable): New error class.

* src/ttsapi/errors.py (ErrorDriverNotAvailable): New error.

11 years ago(TCPConnection.process_input): Do not report
hanke [Fri, 12 Oct 2007 08:11:09 +0000 (08:11 +0000)]
(TCPConnection.process_input): Do not report
error back to socket if reply is None.
(TCPConnection.process_input): Pass ClientGone up.

11 years ago(Structure.__init__): Default
hanke [Fri, 12 Oct 2007 08:10:54 +0000 (08:10 +0000)]
(Structure.__init__): Default
value is now being copied, not assigned, to each new
structure.

11 years ago* src/provider/sleep.py: New module.
hanke [Sat, 29 Sep 2007 11:18:08 +0000 (11:18 +0000)]
* src/provider/sleep.py: New module.

* src/provider/sleep.py (Sleeper): New module/class.

11 years ago*** empty log message ***
hanke [Sat, 29 Sep 2007 11:17:13 +0000 (11:17 +0000)]
*** empty log message ***

11 years ago(TCPConnection._report_error): Accept
hanke [Sat, 29 Sep 2007 11:17:04 +0000 (11:17 +0000)]
(TCPConnection._report_error): Accept
also TTSAPIError.

11 years ago(TTSAPIError.__str__): Fixed.
hanke [Sat, 29 Sep 2007 11:16:17 +0000 (11:16 +0000)]
(TTSAPIError.__str__): Fixed.

11 years ago(Provider.set_volume): Handle volume settings.
hanke [Sat, 29 Sep 2007 11:15:52 +0000 (11:15 +0000)]
(Provider.set_volume): Handle volume settings.

11 years ago* src/provider/audio.py (Audio.set_volume): New function.
hanke [Sat, 29 Sep 2007 11:15:28 +0000 (11:15 +0000)]
* src/provider/audio.py (Audio.set_volume): New function.
(post_event): Added blocking mode.

* src/provider/audio.py (events): Use sleep.Sleeper() for sleeping.
(receive_data): If events are received, call event_sleeper.interrupt()

11 years ago*** empty log message ***
hanke [Mon, 24 Sep 2007 14:44:57 +0000 (14:44 +0000)]
*** empty log message ***

11 years ago(TCPConnection.send_audio_event): Call
hanke [Mon, 24 Sep 2007 14:44:48 +0000 (14:44 +0000)]
(TCPConnection.send_audio_event): Call
self._quit() instead of raising ClientGone
(TCPConnection._report_error): Call self._quit() on IOError.

11 years ago(SocketConnection._write): Raise IOError
hanke [Mon, 24 Sep 2007 14:44:43 +0000 (14:44 +0000)]
(SocketConnection._write): Raise IOError
if socket.send() is not succesfull.
(SocketConnection.close): Raise IOError
if socket.shutdown() is not succesfull.

11 years agoImport logging.
hanke [Mon, 24 Sep 2007 14:43:42 +0000 (14:43 +0000)]
Import logging.

11 years ago(Provider.cancel): Call 'discard' instead of 'stop'.
hanke [Mon, 24 Sep 2007 14:43:22 +0000 (14:43 +0000)]
(Provider.cancel): Call 'discard' instead of 'stop'.
This is necessary so that we prevent messages from being said even when
audio output was not started yet.

11 years ago* src/provider/festival.py (Controller.retrieve_data.read_item): Added
hanke [Mon, 24 Sep 2007 14:43:14 +0000 (14:43 +0000)]
* src/provider/festival.py (Controller.retrieve_data.read_item): Added
condition to terminate data reading when audio_data is not None,
but empty (only NIST header, no data).

* src/provider/festival.py (Controller.retrieve_data.read_item)
(Controller.retrieve_data.read_item): Terminate if audio_data is
None or if lenght of audio data is 0.
(Controller.retrieve_data.read_item): Missing return added.

* src/provider/festival.py (Controller.say_icon): Festival command
speechd-icon changed to speechd-sound-icon.

11 years ago(MessageNotInPlayback): New exception.
hanke [Mon, 24 Sep 2007 14:41:10 +0000 (14:41 +0000)]
(MessageNotInPlayback): New exception.

11 years agoUnittest for TTS API functionality.
hanke [Mon, 24 Sep 2007 07:36:58 +0000 (07:36 +0000)]
Unittest for TTS API functionality.

11 years ago(Provider.set_pitch): rate -> pitch
hanke [Mon, 24 Sep 2007 07:35:45 +0000 (07:35 +0000)]
(Provider.set_pitch): rate -> pitch

11 years ago*** empty log message ***
hanke [Mon, 24 Sep 2007 07:35:35 +0000 (07:35 +0000)]
*** empty log message ***

11 years ago* src/ttsapi/client.py (TCPConnection): Use logging.
hanke [Mon, 24 Sep 2007 07:35:21 +0000 (07:35 +0000)]
* src/ttsapi/client.py (TCPConnection): Use logging.

* src/ttsapi/client.py (TCPConnection.register_callback): Typo fixed if -> elif.

11 years ago(Structure.__str__): New method.
hanke [Mon, 24 Sep 2007 07:35:00 +0000 (07:35 +0000)]
(Structure.__str__): New method.

11 years ago* src/ttsapi/server.py (TCPConnection.process_input): Report UnknownError on socket,
hanke [Mon, 24 Sep 2007 07:34:40 +0000 (07:34 +0000)]
* src/ttsapi/server.py (TCPConnection.process_input): Report UnknownError on socket,
do not raise exception.
(TCPConnection._report_error): Accept exception classes as parameter.

* src/ttsapi/server.py (TCPConnection.process_input): If
TTSAPIError is raised, try to translate it to the appropriate
Error exception.

* src/ttsapi/server.py (TCPConnection.process_input): Raise error if an exception happens during
function call. Log traceback.

11 years ago(TTSAPIError.__init__): Error description
hanke [Mon, 24 Sep 2007 07:34:13 +0000 (07:34 +0000)]
(TTSAPIError.__init__): Error description
argument renamed and moved to optional.
(TTSAPIError.__str__): New method.

11 years ago(receive_data): Only call read_data when
hanke [Mon, 24 Sep 2007 07:33:05 +0000 (07:33 +0000)]
(receive_data): Only call read_data when
data_length != 0.

11 years ago* src/provider/driver.py (RetrievalSocket.send_data_block): Protect
hanke [Mon, 24 Sep 2007 07:32:58 +0000 (07:32 +0000)]
* src/provider/driver.py (RetrievalSocket.send_data_block): Protect
socket.send() with a lock.

* src/provider/driver.py (RetrievalSocket.__init__): Use lock to protect
data write on socket.

11 years ago(FestivalConnection._read_to_buffer):
hanke [Mon, 24 Sep 2007 07:32:51 +0000 (07:32 +0000)]
(FestivalConnection._read_to_buffer):
Prevent infinite loop when select.select signals activity but in
fact there is none (strange)

11 years ago*** empty log message ***
hanke [Thu, 20 Sep 2007 09:07:07 +0000 (09:07 +0000)]
*** empty log message ***

11 years ago(TCPConnection.process_input): Raise error if an exception happens during
hanke [Thu, 20 Sep 2007 09:06:38 +0000 (09:06 +0000)]
(TCPConnection.process_input): Raise error if an exception happens during
function call. Log traceback.

11 years ago(SocketConnection._write): Release lock even if connection crashes.
hanke [Thu, 20 Sep 2007 09:06:26 +0000 (09:06 +0000)]
(SocketConnection._write): Release lock even if connection crashes.

11 years ago(TCPConnection.register_callback): Typo fixed if -> elif.
hanke [Thu, 20 Sep 2007 09:06:01 +0000 (09:06 +0000)]
(TCPConnection.register_callback): Typo fixed if -> elif.

11 years ago*** empty log message ***
hanke [Wed, 19 Sep 2007 12:57:27 +0000 (12:57 +0000)]
*** empty log message ***

11 years ago(TCPConnection.process_input): Handle communication
hanke [Wed, 19 Sep 2007 12:57:16 +0000 (12:57 +0000)]
(TCPConnection.process_input): Handle communication
errors in connection.receive_line()

11 years ago(Connection._communication): Call parents
hanke [Wed, 19 Sep 2007 12:57:11 +0000 (12:57 +0000)]
(Connection._communication): Call parents
providers raise_event() when an event is received.
(Connection.close): Only join child thread if in client mode.

11 years ago(TCPConnection): Call callbacks
hanke [Wed, 19 Sep 2007 12:57:05 +0000 (12:57 +0000)]
(TCPConnection): Call callbacks
on events.
(TCPConnection.register_callback): Changed. Rewritten.