Skip to content

Commit

Permalink
version 23.4.1 and the last changes.
Browse files Browse the repository at this point in the history
Changed eciSynthMode from the default 0 (Sentence) to 1 (Manual): Synthesis and input clearing is controlled by commands only.
Changed the name of callback to eciCallback, and the decorator was placed just before the function.
  • Loading branch information
davidacm committed Apr 8, 2023
1 parent 6a8e331 commit 654750f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
9 changes: 5 additions & 4 deletions addon/synthDrivers/_ibmeci.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ def run(self):
msg = wintypes.MSG()
user32.PeekMessageA(byref(msg), None, 0x400, 0x400, 0)
(dll, handle) = eciNew()
dll.eciRegisterCallback(handle, callback, None)
dll.eciRegisterCallback(handle, eciCallback, None)
dll.eciSetOutputBuffer(handle, samples, pointer(buffer))
dll.eciSetParam(handle, ECIParam.eciSynthMode, 1)
dll.eciSetParam(handle, ECIParam.eciInputType, 1)
params[ECIParam.eciLanguageDialect] = dll.eciGetParam(handle, ECIParam.eciLanguageDialect)
# loading of fallback root.dic/main.dic/abbr.dic officially removed as of 20.08-x0_personal, to make room for other languages' dictionaries.
Expand Down Expand Up @@ -351,9 +352,9 @@ def playStream():
sendIndexes()

endStringReached = False
Callback = WINFUNCTYPE(c_int, c_int, c_int, c_int, c_void_p)
@Callback
def callback (h, ms, lp, dt):

@WINFUNCTYPE(c_int, c_int, c_int, c_int, c_void_p)
def eciCallback (h, ms, lp, dt):
global audioStream, speaking, END_STRING_MARK, endMarkersCount, indexes, endStringReached
if speaking and ms == ECIMessage.eciWaveformBuffer:
audioStream.write(string_at(buffer, lp*2))
Expand Down
26 changes: 9 additions & 17 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# version v23.02.1

* Fixed some bugs in some cases when loading IBMTTS libraries. The way of loading the libraries has been changed to minimize the possibility of errors.
* If the driver can't load the library, an error entry will be shown in the log.
* Changed the way to determine the library being used. Now dll resources (ProductName) is used to determine it.
* Added the version where a documentation change was introduced (for documentation translators).
* Added fixes for french.
* Updated code to use language constants.
* Improved the conditionals to determine the language to be used in process text.
* Restored the 22 kHz sample rate option. Voices that use it have surfaced recently.
* Removed outdated version of Spanish ª crash fix from spanish_ibm_fixes.
* Updated spanish documentation.
* Updated locale strings and documentation for Brazilian and Portugal Portuguese.
* Updated french documentation.
* Updated german interface and documentation.
* Updated translations for italian language.
* Updated english documentation.
# version 23.4.1
Changed eciSynthMode from the default 0 (Sentence) to 1 (Manual): Synthesis and input clearing is controlled by commands only.
Tried to work around situations where IBMTTS would say 'comma hundred' or other weird things in English if numbers are separated by commas
Some fixes in english_ibm_fixes should've actually applied globally. Moved the punctuation fixes formerly part of english_ibm_fixes to a new global_ibm_fixes section to improve the experience for non-English languages
Fixed short pauses pronouncing the right parenthesis if IBMTTS was used. While this change will make the short pauses expression slightly less affective, it will still work in general
Updated German anticrash further to catch more cases. #88
More space removal changes. The expression will take into account numbers as well as letters in the negative lookahead, and added the question mark to its captured punctuation
Improved the IBMTTS space removal expression so it doesn't catch false positives such as it's a .mp3 file
added a log message if the selected library is not correct. It shows the exception that raised the failure.

1 comment on commit 654750f

@harrymkt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello. please develop like this, for sapi5 too

Please sign in to comment.