platform/core/uifw/tts.git
4 months agoMerge "Fix race condition when player thread is terminated" into tizen
Wonnam Jang [Wed, 3 Jan 2024 05:35:30 +0000 (05:35 +0000)]
Merge "Fix race condition when player thread is terminated" into tizen

4 months agoFix race condition when player thread is terminated 13/303513/1
wn.jang [Fri, 29 Dec 2023 05:43:59 +0000 (14:43 +0900)]
Fix race condition when player thread is terminated

Change-Id: I1db88e6f4f308e59eb1ff6122733e17361d36a7b

5 months agoUpdate since_tizen in header files 65/302365/1
sooyeon [Wed, 6 Dec 2023 01:58:05 +0000 (10:58 +0900)]
Update since_tizen in header files

Change-Id: I8741705d9588a1b899615c1d8999832537700cee
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
5 months agoUpdate version (1.80.10) 31/302131/1 accepted/tizen_unified_riscv accepted/tizen/unified/20231205.024654 accepted/tizen/unified/riscv/20231211.234133
Suyeon Hwang [Fri, 1 Dec 2023 01:35:09 +0000 (10:35 +0900)]
Update version (1.80.10)

Change-Id: Ie565a2e7a10c366a560bbb2072dd2f1fd7a00250
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
5 months agoMerge "Remove unnecessary sub thread checking logic" into tizen
Suyeon Hwang [Fri, 1 Dec 2023 01:34:42 +0000 (01:34 +0000)]
Merge "Remove unnecessary sub thread checking logic" into tizen

5 months agoRemove unnecessary sub thread checking logic 12/302112/1
Suyeon Hwang [Thu, 30 Nov 2023 10:03:20 +0000 (19:03 +0900)]
Remove unnecessary sub thread checking logic

- Issue:
Sometimes tts_destroy() is delayed without any reason.

- Solution:
This patch removes unncessary logic for checking active ecore sub
thread. In old version, tts.c module makes a sub thread for some reason
so the framework should check the active subthread for safe handle
destroy. However, since tizen 7.0, tts.c module does not make a sub
thread any more. And only the tts_core.c makes some sub thread and those
sub threads are completely controlled by the framework. So the checking
logic in tts.c is unncessary now.

Change-Id: I5f2ea8aa16f65e82e94332c046ae74ffba569f78
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
5 months agoMerge "Fix potential memory leak" into tizen
Sooyeon Kim [Mon, 27 Nov 2023 07:02:38 +0000 (07:02 +0000)]
Merge "Fix potential memory leak" into tizen

5 months agoMerge "Fix svace issue (resolve memory leak)" into tizen
Sooyeon Kim [Mon, 27 Nov 2023 07:02:33 +0000 (07:02 +0000)]
Merge "Fix svace issue (resolve memory leak)" into tizen

6 months agoFix potential memory leak 45/301245/1
sooyeon [Mon, 13 Nov 2023 04:46:09 +0000 (13:46 +0900)]
Fix potential memory leak

Change-Id: Ie34bf3d8a9eb2a33edda06237023b1870d6eee94
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
6 months agoUpdate version (1.80.9) 33/300433/1 accepted/tizen/unified/20231026.032436
Suyeon Hwang [Wed, 25 Oct 2023 02:12:08 +0000 (11:12 +0900)]
Update version (1.80.9)

Change-Id: Ie332e0eec9f179abedd6b2b75104d00b692db685
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
6 months agoFix thread suspend logic for pkgmgr_thread 10/300410/1
Suyeon Hwang [Tue, 24 Oct 2023 06:33:44 +0000 (15:33 +0900)]
Fix thread suspend logic for pkgmgr_thread

- Issue:
If pkgmgr_client_new() is continously failed, pkgmgr_thread can sleep
very long time and this can cause deadlock when the app tries to destroy
the handle.

- Solution:
To reduce the error log, gradually increased suspend time logic was
added in pkgmgr thread. However, the suspend time could increase
without limitation and this long suspend time might cause critical
deadlock.
To solve this problem, this patch changes the suspend logic with
conditional variable. Using conditional variable, the framework will be
able to resume the thread and properly terminate it even if the suspend
time is too long. And also this patch adds a limitation for the suspend
time. So, even if the thread termination logic is failed, the thread
will be exited in a reasonable time.

Change-Id: I6e126464032a70dbf1d5f63a03c7a85c01ef0a8d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
7 months agoFix svace issue (resolve memory leak) 33/299533/2
sooyeon [Wed, 4 Oct 2023 07:05:18 +0000 (16:05 +0900)]
Fix svace issue (resolve memory leak)

Change-Id: I803bbf8bd03bb056d3e4366bd87c2aecb9c4e739
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
7 months agoUpdate version (1.80.8) 66/299666/1
Suyeon Hwang [Fri, 6 Oct 2023 08:16:17 +0000 (17:16 +0900)]
Update version (1.80.8)

Change-Id: I6cfad6b0ff2de2339933d095c2799d7cdcfe0174
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
7 months agoStop player thread when an error occurs 24/299624/1
Suyeon Hwang [Thu, 5 Oct 2023 12:18:12 +0000 (21:18 +0900)]
Stop player thread when an error occurs

Change-Id: Iac55d6e61df0b9020d2db9f85e568df73809a898
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
7 months agoUpdate version (1.80.7) 45/299345/1 accepted/tizen/8.0/unified/20231005.094308 accepted/tizen/unified/20230926.161018
Suyeon Hwang [Tue, 26 Sep 2023 07:50:48 +0000 (16:50 +0900)]
Update version (1.80.7)

Change-Id: I787acb241b2fad84d81e5e649d37c70f9872c318
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
7 months agoUse safe function to avoid security issues 44/299344/1
Suyeon Hwang [Tue, 26 Sep 2023 07:40:25 +0000 (16:40 +0900)]
Use safe function to avoid security issues

Change-Id: I9d62fb45b44eaaf223aba5c6f58ed504ac6e3027
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
7 months agoUpdate version (1.80.6) 97/299297/1
Suyeon Hwang [Mon, 25 Sep 2023 10:37:12 +0000 (19:37 +0900)]
Update version (1.80.6)

Change-Id: Id140201ee2401e4918096ff8f256a999a2034b06
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
7 months agoRecord debug information for each TTS playback 20/299020/3
Suyeon Hwang [Mon, 18 Sep 2023 08:21:03 +0000 (17:21 +0900)]
Record debug information for each TTS playback

- Requirements:
The platform debugging tool wants to know the playback information for
each TTS requets if the debugger tool is run.

- Contents:
This patch adds new logic for recording the information about the TTS
playback. Through this patch, the platform level debugger tool can
access the information about playback.

Change-Id: I3245d49da8b7023eb7436f61311dfaa06d3f68a8
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
8 months agoUpdate version (1.80.5) 89/298689/1
wn.jang [Tue, 12 Sep 2023 09:52:27 +0000 (18:52 +0900)]
Update version (1.80.5)

Change-Id: I5b7555c8c2d51fc65414242d80bd77db930f7aa4

8 months agoChange unit of synthesized PCM data when calculating xRT 80/298680/1
wn.jang [Tue, 12 Sep 2023 08:57:06 +0000 (17:57 +0900)]
Change unit of synthesized PCM data when calculating xRT

Change-Id: Ia0465b4c9dc248659c6c78a3a3c86242fa0b7dcf

9 months agoUpdate version (1.80.4) 89/296289/1 accepted/tizen/unified/20230726.020659
wn.jang [Tue, 25 Jul 2023 03:00:38 +0000 (12:00 +0900)]
Update version (1.80.4)

Change-Id: I8ced794197ecd7e381c432f3ec300debf037ebc4

9 months agoMerge "Fix descriptions according to checking header tools" into tizen
Wonnam Jang [Tue, 25 Jul 2023 02:57:00 +0000 (02:57 +0000)]
Merge "Fix descriptions according to checking header tools" into tizen

9 months agoFix descriptions according to checking header tools 45/295845/2
wn.jang [Fri, 14 Jul 2023 10:11:36 +0000 (19:11 +0900)]
Fix descriptions according to checking header tools

Change-Id: I255cd2ce425fc0eac994996302da672f7ce479c9

9 months agoUpdate version (1.80.3) 21/296221/1
Suyeon Hwang [Mon, 24 Jul 2023 04:53:48 +0000 (13:53 +0900)]
Update version (1.80.3)

Change-Id: I468af7803bdf6863022413992a051b8593855c07
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoFix typo in function and variable names 18/296018/2
Suyeon Hwang [Tue, 18 Jul 2023 10:21:24 +0000 (19:21 +0900)]
Fix typo in function and variable names

Change-Id: I55cb92a1b44c0d2e136baf1caa897a4826346c7f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoFix coding style for internal function and constant 10/296010/1
Suyeon Hwang [Tue, 18 Jul 2023 07:35:44 +0000 (16:35 +0900)]
Fix coding style for internal function and constant

- Contents:
This patch removes the two underscore identifier from function name. And
also this patch renames the constant variables to fit the common coding
convention.

Change-Id: I6df8cec4d4f35697a4a840889f49aa5f15dc88c3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoFix the description of each test cases 09/296009/1
Suyeon Hwang [Tue, 18 Jul 2023 07:23:08 +0000 (16:23 +0900)]
Fix the description of each test cases

- Content:
This patch fixes the description proper. It is no neccessary but this
change will help to understand each test cases.

Change-Id: I1be749e7c6c9fd01b35803fe7261c993b5d8e48b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoRemove unused or unreachable code 59/295159/2
Suyeon Hwang [Mon, 3 Jul 2023 08:42:49 +0000 (17:42 +0900)]
Remove unused or unreachable code

- Contents:
This patch removes some unused or unrechable code. Through this patch,
unvaluable code is removed and also test cases covers more code and
logics.

Change-Id: I7822086a9160fafd6014e6759508a6cf3cfaa2cb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoAdd new test cases to increse the coverage 58/295158/2
Suyeon Hwang [Mon, 3 Jul 2023 07:55:00 +0000 (16:55 +0900)]
Add new test cases to increse the coverage

- Contents:
This patch adds new test cases for uncovered line. Through this patch,
developers can check the behavior about specific situations.

Change-Id: I5e9175a9997ff26c58cd4b6ab31e05dd154b4408
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoRefactor unit tests with utility class 57/295157/2
Suyeon Hwang [Fri, 30 Jun 2023 12:10:44 +0000 (21:10 +0900)]
Refactor unit tests with utility class

- Contents:
This patch fixes all unit tests using new utility class from previous
commit. Through this change, many duplicated codes in test cases can be
removed.

Change-Id: Ia869ae0b334e2505deaebbf9c9484bef36a58468
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoAdd test utility class 56/295156/2
Suyeon Hwang [Thu, 29 Jun 2023 01:56:39 +0000 (10:56 +0900)]
Add test utility class

- Contents:
This patch introduces new utility class for test case. Through this
class, developers can easily make the test cases. This new class
provides many useful utility methods and frequently used code blocks.

Change-Id: Ife285e7e7bd065423197727bcaeb72219a3ecc8e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoChange error to no error, when speak data is empty 62/295362/2
wn.jang [Thu, 6 Jul 2023 05:14:48 +0000 (14:14 +0900)]
Change error to no error, when speak data is empty

Cause: In the __wait_synthesis() function, if the synth_control is changed from DOING
to DONE and there's no next speak_data, the synthesis is terminated. At this time, it
is normal operation, even if there's no speak data.

Solution: Change error to no error, when speak data is empty.

Reference log:
01-27 05:01:43.733+0900 I/ttsd     (P  798, T  798): ttsd_server.c: __wait_synthesis(100) > [Server] synth_control(1)
01-27 05:01:43.733+0900 D/ttsd     (P  798, T  798): ttsd_server.c: __synthesis(116) > @@@ SYNTHESIS  START
01-27 05:01:43.733+0900 W/ttsd     (P  798, T  798): ttsd_data.cpp: ttsd_data_get_speak_data(563) > [DATA WARNING] There is no speak data
01-27 05:01:43.733+0900 D/ttsd     (P  798, T  798): ttsd_server.c: __synthesis(121) > @@@ Fail to get speak data. ret(-49348604)
01-27 05:01:43.733+0900 D/ttsd     (P  798, T  798): ttsd_server.c: __synthesis(122) > @@@ SYNTHESIS  END

Change-Id: I8ce4823ee9791b1b2854c1f1ed7c01469151807e

10 months agoSend synthesized PCM data from TTS engine to client 80/295280/4
wn.jang [Tue, 4 Jul 2023 10:51:47 +0000 (19:51 +0900)]
Send synthesized PCM data from TTS engine to client

Change-Id: I91dd83aaa808fa46bc2e4768797db66da3f524c1

11 months agoUpdate version (1.80.2) 82/293782/1 accepted/tizen/unified/20230608.164318
Suyeon Hwang [Mon, 5 Jun 2023 02:00:12 +0000 (11:00 +0900)]
Update version (1.80.2)

Change-Id: Ie7bdbf99e02260da7de2e4d9078baa982e54fe18
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
11 months agoDestroy old rpc handle for clean reconnection 62/293762/1
Suyeon Hwang [Fri, 2 Jun 2023 11:27:19 +0000 (20:27 +0900)]
Destroy old rpc handle for clean reconnection

- Issue:
When the client is disconnected, sometimes, the rpc handle can be
expired.

- Solution:
When the client is disconnected, the client should try to reconnect.
However, sometimes, the client can try to reconnect with expired rpc
handle. In this case, the client library can not create new rpc handle,
because current logic only makes new rpc handle if the function returns
I/O error. To resolve this issue, this patch destroyes the old handle
if the client is disconnected. Through this change, the client will be
sure to reconnect with new rpc handle.

Change-Id: Ic801abf2f69a291ca6b5c8748a67f987be81aa93
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
11 months agoUpdate version (1.80.1) 87/293687/1
wn.jang [Fri, 2 Jun 2023 06:11:44 +0000 (15:11 +0900)]
Update version (1.80.1)

Change-Id: Ic0834deb2ffac2c1df02882cbc4cf6d33d667818

11 months agoAdd binary file to support risc64 build 84/293684/1
wn.jang [Fri, 2 Jun 2023 05:30:53 +0000 (14:30 +0900)]
Add binary file to support risc64 build

Change-Id: I457e42fc9af41fd50092d2e6110ad701e3771b6f

11 months agoUpdate version (1.80.0) 02/293502/1
Suyeon Hwang [Wed, 31 May 2023 01:28:24 +0000 (10:28 +0900)]
Update version (1.80.0)

Change-Id: I88058c8dd0e61ffc417cd065329fac37a5e4c9fc
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
11 months agoFix tizen version description (7.5 -> 8.0) 01/293501/1
Suyeon Hwang [Wed, 31 May 2023 01:27:40 +0000 (10:27 +0900)]
Fix tizen version description (7.5 -> 8.0)

Change-Id: I9bfe513275e17c3d373c4d826b945e8f66d8fd48
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoUpdate version (1.75.10) 40/292440/1
Suyeon Hwang [Mon, 8 May 2023 06:18:47 +0000 (15:18 +0900)]
Update version (1.75.10)

Change-Id: Iecc5d11592f204fd3c97aa4e2edafc0b39d1b839
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoSet status vconf when the synthesis is started 39/292439/1
Suyeon Hwang [Mon, 8 May 2023 06:15:02 +0000 (15:15 +0900)]
Set status vconf when the synthesis is started

Change-Id: Id6152a67321c63d917fb763a5837e35f5ea36386
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoRevert owner as 'ui_fw' 35/291835/1 accepted/tizen/unified/20230425.130131
Suyeon Hwang [Mon, 24 Apr 2023 02:51:08 +0000 (11:51 +0900)]
Revert owner as 'ui_fw'

Change-Id: I6ff2bafe0b459baf8a107eb1f67ac6cde9bd9fd8
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoAdd write permission to group 96/291796/1
Suyeon Hwang [Fri, 21 Apr 2023 08:38:02 +0000 (17:38 +0900)]
Add write permission to group

Change-Id: I518bd6381b25267cd42fc79e485eb3a2fca92d1e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoUpdate version (1.75.9) 64/291764/1
Suyeon Hwang [Fri, 21 Apr 2023 04:21:41 +0000 (13:21 +0900)]
Update version (1.75.9)

Change-Id: I189d0395f75140faf5ad35fcb1b8865144e6a72c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoFix pointer checking condition and owner of config file 60/291660/2
Suyeon Hwang [Thu, 20 Apr 2023 02:29:09 +0000 (11:29 +0900)]
Fix pointer checking condition and owner of config file

- Issue:
tts_setting_set_voice() does not set voice properly.

- Solution:
Previous code validates the voice with invalid condition. So, the
function returns error even if the voice is valid. Meanwhile, the app
can not write the config file because of the owner of the file. To
resolve these issues, this patch fixes the checking condition and owner
of config file. Through this patch, the function will properly set the
voice.

 To resolve this
issue, this patch fixes the condition as a right way.

Change-Id: I01ac1fd09edb9a10ea365c2376ccf3d6d7a9c4f1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoMerge "Update version (1.75.8)" into tizen
Suyeon Hwang [Wed, 19 Apr 2023 11:26:35 +0000 (11:26 +0000)]
Merge "Update version (1.75.8)" into tizen

12 months agoMerge "Add logs to measure xRT for synthesizing from tts engine" into tizen
Wonnam Jang [Wed, 19 Apr 2023 09:53:25 +0000 (09:53 +0000)]
Merge "Add logs to measure xRT for synthesizing from tts engine" into tizen

12 months agoUpdate version (1.75.8) 24/291624/1 accepted/tizen/unified/20230420.091930
Suyeon Hwang [Wed, 19 Apr 2023 08:36:35 +0000 (17:36 +0900)]
Update version (1.75.8)

Change-Id: Ia522f2b9b72e4a97789785a84304cbf663a070d2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoAdd logs to measure xRT for synthesizing from tts engine 84/291284/5
wn.jang [Thu, 13 Apr 2023 01:30:17 +0000 (10:30 +0900)]
Add logs to measure xRT for synthesizing from tts engine

Change-Id: I9a43b12403df907db02d6309a5cdd4c5957a3be8

12 months agoPass missing parameter to real function 91/291591/1
Suyeon Hwang [Wed, 19 Apr 2023 02:43:53 +0000 (11:43 +0900)]
Pass missing parameter to real function

- Issue:
After reprepare_on_demand(), the client handle is missing.

- Solution:
Previous code does not pass all neccessary parameters, so the function
can write value into arbitrary pointer. And this pointer access can
cause critical memory crash. Thus, this patch fixes the code to make
sure the tts_ipc module pass all proper parameters to actual function in
tts_dbus and tts_tidl module.

Change-Id: I2276c05e3b29f070664b8fad607cc1d13ddb9cee
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoUpdate version (1.75.7) 96/291496/2 accepted/tizen/unified/20230419.044940
Suyeon Hwang [Mon, 17 Apr 2023 11:29:19 +0000 (20:29 +0900)]
Update version (1.75.7)

Change-Id: Icb8c92cd7b57b45422c018ee74dd31944573d7d0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoMove unreleased definitions to the internal header 17/291517/1
Suyeon Hwang [Tue, 18 Apr 2023 02:39:17 +0000 (11:39 +0900)]
Move unreleased definitions to the internal header

Change-Id: I4746d219d5385713b278bca58abf9115061837c3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoFix wrong condition for parameter checker 95/291495/1
Suyeon Hwang [Mon, 17 Apr 2023 11:26:10 +0000 (20:26 +0900)]
Fix wrong condition for parameter checker

- Issue:
tts_set_playing_mode() always returns invalid parameter error.

- Solution:
This patch fixes the condition for parameter checker in
tts_set_playing_mode(). Previous condition statement always returns
true, so the function works wrong. Through this patch, the function will
properly check the paramter.

Change-Id: I2fdb5254f942f6e9c1c1741e241bcfc32fe4cbdf
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoUpdate version (1.75.6) 64/291464/1
Suyeon Hwang [Mon, 17 Apr 2023 07:21:43 +0000 (16:21 +0900)]
Update version (1.75.6)

Change-Id: I58057a859231875fe95e2927e7e9aef7474f0fe0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoProhibit engine ID access after tts_core_deinitialize() 61/291461/1
Suyeon Hwang [Mon, 17 Apr 2023 06:48:57 +0000 (15:48 +0900)]
Prohibit engine ID access after tts_core_deinitialize()

- Issue:
check_engine_launching_status() is invoked and it makes the segmentation
fault even though tts_core_deinitialize() is already finished.

- Solution:
After tts_core_deinitialize(), there is no client, so
check_engine_launching_stats() is not neccessary to be invoked. However,
previous code does not unset the callback, so the callback is still
invoked and it makes segmentation fault error by accessing invalid
pointer. To resolve this issue, this patch makes the code unset the
callback in tts_core_deinitialize(). And also this patch adds null
checker in the callback. Thus, invalid pointer access will not occur
through this patch.

Change-Id: I703e0a0e3cbc7d548e84b274609f27d9442d8537
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoUpdate version (1.75.5) 98/290998/1
Suyeon Hwang [Thu, 6 Apr 2023 06:56:21 +0000 (15:56 +0900)]
Update version (1.75.5)

Change-Id: I08dd17b619db1e69166b21ee7f551e7e62ed0b55
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoSet name for TTS player thread 97/290997/1
Suyeon Hwang [Wed, 5 Apr 2023 12:30:11 +0000 (21:30 +0900)]
Set name for TTS player thread

Change-Id: I72067b8a0e59e2529157d59e4a9bac6e59ce7937
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoAdd to set playing mode to decide where the synthesized pcm data will be played 56/285356/3
wn.jang [Fri, 9 Dec 2022 09:39:39 +0000 (18:39 +0900)]
Add to set playing mode to decide where the synthesized pcm data will be played

Needs: The application wants to play the synthesized pcm data on client side.

Solution: Provides the Api to set playing mode to decide where it will be played.

This commit is related to following commit.
https://review.tizen.org/gerrit/#/c/platform/core/uifw/tts/+/284933/

Change-Id: If9e73f05409feab8e9ff371aee1570b38d6e2407

13 months agoUpdate version (1.75.4) 90/290690/1
dyamy-lee [Fri, 31 Mar 2023 01:12:49 +0000 (10:12 +0900)]
Update version (1.75.4)

Change-Id: I931f1687cd0ec57f051f76f60bd9eb9f64d43281

13 months agoset option -t on engine-info directory 78/290678/1
dyamy-lee [Thu, 30 Mar 2023 11:48:36 +0000 (20:48 +0900)]
set option -t on engine-info directory

- Issue : When engine config file created, the file's smack label is still not follow directory.

- Solution : By giving transmute option of smack, it can works all created file and directory get same smack label with this directory.

Change-Id: I0ca6d2a9f0aef13ff252d3b94a61f5ab6313f35c

13 months agochange the timing of smack label change in spec file 50/290650/1
dyamy-lee [Thu, 30 Mar 2023 06:56:39 +0000 (15:56 +0900)]
change the timing of smack label change in spec file

- Issue : tts directory which under .voice directory is not applied change of smack label, becasue it did before directory created.

- Solution : Change the timeing of execution smack label change after tts directory created.

Change-Id: I40ca5df3d735382fb91f4f002ec728d81e7ad9dd

13 months agoSmack label change in spec file 31/290631/1
dyamy-lee [Thu, 30 Mar 2023 02:43:17 +0000 (11:43 +0900)]
Smack label change in spec file

- Issue : After tts engine update, a config file which created under engine-info directory is changed following installing program's smack label.
          So, it's not working after engine update.

- Solution : By change smack label from underscore('_') to specific label('User::App::Shared'),
             it can prevent following installing program's smack label

Change-Id: If90b4e42201e4573d80a2a64855aa08076c065d8

13 months agoUpdate version (1.75.3) 68/290368/1 accepted/tizen/unified/20230327.143739
dyamy-lee [Wed, 22 Mar 2023 06:09:41 +0000 (15:09 +0900)]
Update version (1.75.3)

Change-Id: I34e0e65cb70002abcd22babccc1ffb7276d865d6

13 months agoResolve unused value and overite problem 87/290187/7
dyamy-lee [Tue, 21 Mar 2023 07:50:15 +0000 (16:50 +0900)]
Resolve unused value and overite problem

- Issue : coverity reports these as issues. It does free and set NULL, but when assigning value NULL, that stored value is overwritten before it can be used.

- Solution : define value in that value's scope

Change-Id: I53644403ff1595cdfad790d7b454d2b33a0a8e44

13 months agoChange directories' permission of config xml file 77/290177/1
dyamy-lee [Wed, 21 Dec 2022 06:53:13 +0000 (15:53 +0900)]
Change directories' permission of config xml file

- Issue : In case of root daemon, it cannot read tts-config file because permission didn't allow it.

- Solution : We change tts-config file's directory permission every user can read the tts-config file.

Change-Id: I133de3acfbb8286890558837953cfa871c5dd413

13 months agoChange directories of tts-config file and engine-info file 76/290176/1
sooyeon [Fri, 26 Aug 2022 02:39:43 +0000 (11:39 +0900)]
Change directories of tts-config file and engine-info file

- Issue: In case of root daemon, it cannot access tts-config file and engine-info file,
        because they are installed in user directories respectively.

- Solution: We move tts-config file and engine-info file to global user data (/opt/usr/data)
           to make both root daemon and users access the files.

Change-Id: Iedd7249b3526edaa600805d1a8c3f3c6504b7549
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
13 months agoUpdate version (1.75.2) 51/290151/1 accepted/tizen/unified/20230321.123228
wn.jang [Tue, 21 Mar 2023 01:59:15 +0000 (10:59 +0900)]
Update version (1.75.2)

Change-Id: I2d840d64edac48d17b99b786238cb05b74f931ad

13 months agoFix memory leak detected by static analysis tool 48/290148/1
wn.jang [Tue, 21 Mar 2023 00:49:09 +0000 (09:49 +0900)]
Fix memory leak detected by static analysis tool

Change-Id: I332780d46eb2d8ad297a0526a87eac1ae06afdad

14 months agoUpdate version (1.75.1) 34/289934/1 accepted/tizen/unified/20230316.174017
Suyeon Hwang [Thu, 16 Mar 2023 00:35:39 +0000 (09:35 +0900)]
Update version (1.75.1)

Change-Id: I1c35ae367783fd6579227c28dee8a5b016f4d192
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoAdd the version notification for new enum values 56/289856/1
Suyeon Hwang [Wed, 15 Mar 2023 01:09:55 +0000 (10:09 +0900)]
Add the version notification for new enum values

- Requirements:
New enum values require the version description.

- Contents:
This patch adds the version description for new enum values.

Change-Id: I25f7db9189cb2594c92e70d6056ba9d6a2d79650
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoUpdate version (1.75.0) 05/289505/1 accepted/tizen/unified/20230316.101429
Suyeon Hwang [Thu, 9 Mar 2023 02:21:11 +0000 (11:21 +0900)]
Update version (1.75.0)

Change-Id: I184c08b8358b590c2254488adeaafe710fa2e6dd
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoInvoke config changed callbacks directly 52/289452/1
Suyeon Hwang [Fri, 24 Feb 2023 05:14:10 +0000 (14:14 +0900)]
Invoke config changed callbacks directly

- Issue:
If the app changes the config using setting API, the framework did not
invoke config changed callbacks.

- Solution:
In previous code, tts_config_mgr module can knows the config changes by
checking the difference between the values in memory and config file.
However, the values in memory and config file were the same if the app
uses the setting API. This is because the setting API sets the value to
both memory and the file.
So, this patch adds a new logic for invoking the callacks. Through this
patch, tts_config_mgr module calls the related callbacks in case the app
changes the config itself.

Change-Id: If2da13a32e8e12b321812586e4c4bb93fd5f769e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoRefactor logic for automatically setting voice 95/289395/2
Suyeon Hwang [Thu, 23 Feb 2023 06:47:49 +0000 (15:47 +0900)]
Refactor logic for automatically setting voice

- Issue:
The logic is too complicated to enhance and expand. And also, the logic
requires unnecessary duplicated code.

- Solution:
This patch refactors the logic for automatically setting voice. Through
this patch, the logic will become easier to read and enhance. And also,
this patch removes unnecessary duplicated code.

Change-Id: I214d1a4d0a31ed34d794573eec9cec405769cedf
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoUnify the order of log to store value 81/289381/2
Suyeon Hwang [Thu, 23 Feb 2023 02:07:42 +0000 (11:07 +0900)]
Unify the order of log to store value

- Issue:
Each functions have different order of logic for storing value.

- Solution:
In previous code, some functions first stored file and then changed the
memory. However, some other functions did the reverse of it. So, this
patch unifies the order of logic for storing values in each functions.
Through this patch, all functions will store the file first and then
update the config struture on the memory.

Change-Id: Id8e4671bc342060c7c779578e7b3e75ea0dd640a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoFix client releasing code simpler 76/289376/4
Suyeon Hwang [Wed, 22 Feb 2023 04:27:06 +0000 (13:27 +0900)]
Fix client releasing code simpler

- Issue:
tts_config_mgr_unset_callback should be invoked for all clients when
they are released.

- Solution:
This patch fixes the __tts_config_release_client()'s behavior. Through
this patch, __tts_config_release_client() will invoke
tts_config_mgr_unset_callback() to reset all callbacks in client
structure.
And plus, this patch changes the name and type of these functions. These
two functions are only invoked in this file. This means that those
functions are private. So, this patch makes these functions as static
and changes the name of these functions which avoids the reserved
identifiers.

Change-Id: I2d20ca73595eacca5a37d8e84822a8d4e0602df7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoSet invalid UID if getting value is failed 34/289134/2
Suyeon Hwang [Thu, 2 Mar 2023 02:43:50 +0000 (11:43 +0900)]
Set invalid UID if getting value is failed

Change-Id: If06e2122c6a824f65b7485e586597e048d3af6c1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoSet service state by engine launching status 79/288379/5
Suyeon Hwang [Tue, 7 Feb 2023 08:21:58 +0000 (17:21 +0900)]
Set service state by engine launching status

- Issue:
If the client is out of service by service reset, client can not get
proper service state.

- Solution:
By the on-demand reprepare logic, the clients subscribing service state
changed event can not get service state until that the client invokes
the API. However, if the client invokes the API depending on service
state, the client may not call the API, so it can be out of service
permanently.
To solve this problem, this patch adds logic for checking engine
launching status. Through this patch, the client library can check
whether the engine is launched or not. When the engine is launched, the
client library notifies the service state changed event to the client
app can run the code which depends on the service state.

Change-Id: If4e3310054143732f5705ed4acfae42762fa21b1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoMerge changes Ied3e8043,I465c4e34 into tizen
Suyeon Hwang [Mon, 6 Mar 2023 05:02:27 +0000 (05:02 +0000)]
Merge changes Ied3e8043,I465c4e34 into tizen

* changes:
  Reprepare instantly for the client speicifed by server
  Update UID of instant reprepare client

14 months agoAdd feature checking logic for engine API 05/288905/1
Suyeon Hwang [Thu, 16 Feb 2023 08:53:17 +0000 (17:53 +0900)]
Add feature checking logic for engine API

- Issue:
Most of the engine API did not return 'not supported error' when the
device does not support the TTS feature.

- Solution:
This patch adds feature checking logic to the beginning of each API
implementation. Through this change, each API will properly check the
required feature and return error. And this behavior is matched to the
description of each API.

Change-Id: I744cb3bbeb6670f3fdfedc1ecd3f9d710f822be2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoReprepare instantly for the client speicifed by server 78/288378/4
Suyeon Hwang [Tue, 7 Feb 2023 06:07:42 +0000 (15:07 +0900)]
Reprepare instantly for the client speicifed by server

- Requirement:
In order to start engine quickly, one of the clients needs to reprepare
instantly.

- Contents:
This patch adds new logic for repreparing. Through this patch, one of
clients which is specified by the server library will reprepare instantly
when the service is out. This specified client will help quick tts engine
launch.

Change-Id: Ied3e804378c835ea2e744bb948462337802ebc39
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoUpdate UID of instant reprepare client 77/288377/4
Suyeon Hwang [Thu, 2 Feb 2023 08:10:38 +0000 (17:10 +0900)]
Update UID of instant reprepare client

- Requirement:
In order to start engine quickly, one of the clients needs to reprepare
instantly.

- Contents:
To make one of the clients reprepare instantly, this patch adds new
logic into the engine library. Through this patch, the engine library
will update the UID of the clieant which needs to reprepare instantly.
This UID update will occur when the connection of the service is changed.

Change-Id: I465c4e3444fbd177feb3bdabdb20338bbab5daf1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
14 months agoDestroy tts handle always on the main thread 49/288549/1 accepted/tizen/unified/20230221.085046
Suyeon Hwang [Mon, 20 Feb 2023 02:13:24 +0000 (11:13 +0900)]
Destroy tts handle always on the main thread

- Issue:
In C# application, the garbage colletor can destroy tts handle on a sub
thread, and this behavior can make thread safety issues.

- Solution:
The C# garbage collector can release the instance on a sub thread, so
this can make race condition issues. To prevent this kind of issues,
this patch adds a new logic to tts_destroy() function. Through this
change, the handle destruction logic of tts_destroy() will always be
run on a main thread. This change will prevent race condition issues
because the logic insures that every handle destructions are run on a
main thread and they are not destroyed at the same time.

Change-Id: I90c248a4975410d4211dea93f24ea43e7c00ecb1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
15 months agoTry to prepare when the API is invoked on service out 15/288015/1
Suyeon Hwang [Fri, 13 Jan 2023 08:19:26 +0000 (17:19 +0900)]
Try to prepare when the API is invoked on service out

- Requirement:
To reduce the resource for repreparing, clients need to reprepare when
the API is invoked.

- Contents:
This patch changes the logic about service reset and repreparing.
Through this patch, all clients just set service out flag when the
service reset occurs. Plus, each clients will try to reprepare when the
API is invoked by the app. In previous code, all clients tried to
reprepare at the same time when the service reset occurs. However, this
behavior needed to too much resource for repreparing in short time. This
patch intends to decrease the resource requirements for repreparing by
spreading the reprepare requests.

Change-Id: I4fd7b8905975692efba973a7e6c2423d604b4624
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
15 months agoStore current service state from engine library 14/288014/1
Suyeon Hwang [Thu, 29 Dec 2022 11:10:41 +0000 (20:10 +0900)]
Store current service state from engine library

- Requirement:
Client library needs to get current service state when preparing is
succeeded.

- Contents:
This patch makes client library store the service state in client
structure when preparing is succeeded. If the client listen the service
state changed event, client has to maintain the current service state
even if the service is out. To do this, each client structure has to
store the current service state.
Through this patch, client structure can maintain the latest service
state at preparing success.

Change-Id: If2ea7b9ebc627363f0b16c51a918d2910a4bcd26
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
15 months agoSend service state when preparing is succeeded 13/288013/1
Suyeon Hwang [Thu, 29 Dec 2022 09:04:34 +0000 (18:04 +0900)]
Send service state when preparing is succeeded

- Requirement:
Client library needs to get current service state when preparing is
succeeded.

- Contents:
This patch makes engine library send service state to client library.
To implement on-demand repreparing, client library needs to maintain
current service state. Through this patch, client library can get
service state in preparing protocol.

Change-Id: I7d8b7fb261401abcb230610aac0fd645bab015a1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
15 months agoAdd new IPC parameter for sending service state 12/288012/1
Suyeon Hwang [Thu, 29 Dec 2022 08:01:33 +0000 (17:01 +0900)]
Add new IPC parameter for sending service state

- Requirement:
Client library needs to get current service state when preparing is
succeeded.

- Contents:
This patch changes the IPC interface parameter for service state. The
client library needs to service state information for enhancing
repreparing logic. Through this patch, client application can receive
service state information when preparing is succeeded.

Change-Id: I62eeab554074455d09ac1c28b369dde83318f399
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
15 months agoDestroy RPC handle in ecore idler 83/287583/1 accepted/tizen/unified/20230215.100739
Suyeon Hwang [Thu, 26 Jan 2023 07:52:09 +0000 (16:52 +0900)]
Destroy RPC handle in ecore idler

- Issue:
Invoking tts_unprepare() in event callbacks is allowed and this may
cause segmentation fault by destroying RPC handle in the callback which
is invoked by RPC message.

- Solution:
The app can call tts_unprepare() in the callback. However, this
invocation may cause segmentation fault by destroying the RPC handle in
the callback of the RPC handle itself.
To solve this issue, this patch fixes the RPC handle destruction logic.
Through this patch, the client lib will destroy the handle in ecore idler
callback. This behavior can avoid wrong handle destruction.

Change-Id: I01a2ae528be8f0fa8683c608b3786b5db282d0e1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit 96dd49ebd12b1c1853071cfe5e570e183c6133ee)

15 months agoMerge changes I0ab5030b,Ieed4a8fe into tizen
Suyeon Hwang [Thu, 26 Jan 2023 07:50:38 +0000 (07:50 +0000)]
Merge changes I0ab5030b,Ieed4a8fe into tizen

* changes:
  Fix coding convention about member variables and static functions
  Merge branch 'tizen_7.0' into tizen

15 months agoExtend time delay every 5 failures 47/287047/4
wn.jang [Thu, 19 Jan 2023 06:04:15 +0000 (15:04 +0900)]
Extend time delay every 5 failures

Cause:
In case of robot image, pkgmgr_client_new() function always returns fail.
So it cause a lot of error message and it makes a huge log file over 1GB.

Solution:
Time delay is extended every 5 failures.
This patch makes only 92 errors in 1 day, and only 110 error messages in 10 days.

Change-Id: Ibd5e5844a543adc6831d5ce76858254505dcba3d

15 months agoFix coding convention about member variables and static functions 48/287048/2
Suyeon Hwang [Thu, 19 Jan 2023 06:01:08 +0000 (15:01 +0900)]
Fix coding convention about member variables and static functions

- Issue:
Using two underscores(__) as name of variables or functions is
reserved by C and CPP compilers, so it may occur name colision.

- Solution:
Previously, most of the code followed old tizen coding convention.
However, in case of name, the convention conflicts with C and CPP
standard, because two underscore is already reserved as an identifier by
C and CPP standard. Thus, using two underscores may cause some problems.
To resolve this collision, this patch fixes the name of member variables
and static functions to match C and CPP standard. Through this patch,
CPP files in the project do not use two underscore as name of variables
and functions anymore.

Change-Id: I0ab5030b018d0d28c9cf2927ddbdf8711ecb788b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
15 months agoMerge branch 'tizen_7.0' into tizen 50/287050/1
Suyeon Hwang [Thu, 19 Jan 2023 06:23:12 +0000 (15:23 +0900)]
Merge branch 'tizen_7.0' into tizen

Change-Id: Ieed4a8fe9cd58f50ad26c227baf743119902ecc8

16 months agoUpdate version (1.70.17) 93/286593/1 accepted/tizen/7.0/unified/20230116.165318
Suyeon Hwang [Tue, 10 Jan 2023 09:38:53 +0000 (18:38 +0900)]
Update version (1.70.17)

Change-Id: Ia967177c08ae60c7f59f41646da37316985f5aa3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoCheck and try to recreate the handle if the handle is invalid 78/286578/3
Suyeon Hwang [Tue, 10 Jan 2023 05:23:20 +0000 (14:23 +0900)]
Check and try to recreate the handle if the handle is invalid

- Issue:
Sometimes, the handle creation for audio framework is failed, but the
stt framework try to use this invalid handle.

- Solution:
The AudioStream class did not set nullptr to audio handles. Because of
this behavior, if the handle was not created from the audio framework,
the AudioStream class tried to use garbage pointer as audio handle. This
caused some crashes. To solve this issue, this patch makes the
AudioStream class initialize the audio handle as nullptr. And also, this
patch adds new code for re-creating audio handles of AudioStream and
BackgroundVolume class. This new code is going to be invoked when some
audio handles are not valid.

Change-Id: I7c98473bf9ced056e4a6dfd579455e94db0b9993
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoUpdate version (1.70.16) 31/286431/1 accepted/tizen/7.0/unified/20230106.165639
Suyeon Hwang [Fri, 6 Jan 2023 01:21:38 +0000 (10:21 +0900)]
Update version (1.70.16)

Change-Id: I584b5a4484a89bba86ad3b8bafbb054d4b0b8cdf
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoFix rpc port creation timing 66/286266/5
Suyeon Hwang [Tue, 3 Jan 2023 03:33:06 +0000 (12:33 +0900)]
Fix rpc port creation timing

- Issue:
Even if the tidl connection is out, client lib may ignore connect
request.
And also, the tidl can not re-connect synchronously right after the tidl
is disconnected.

- Solution:
TIDL connect request is up to connected flag variable in tidl info
structure. However, the connected flag is only set by connected,
rejected, and disconnected event callback. And also, tidl can not
re-connect synchronously right after the disconnect() of tidl is invoked.
So, current client lib can not connect to stub in some specific
situation.
To solve this issue, this patch changes the rpc port creation timing.
Through this patch, tts_tidl module always reset the rpc port when the
io error occurs. And also, tts_tidl module can assure the connection by
creating new rpc port when the client want to prepare.

Change-Id: I8cfc143aebb331389d1fb205b7526b43f0301fee
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
17 months agoMerge branch 'tizen' into tizen_7.0 23/285423/1
Suyeon Hwang [Mon, 12 Dec 2022 11:09:41 +0000 (20:09 +0900)]
Merge branch 'tizen' into tizen_7.0

Change-Id: I9cb1e0ee0851c6cbdeade7f9ce67487f0cc55d89

17 months agoMerge "Add codes in client side to set/unset callback for retrieving sythesized pcm...
Wonnam Jang [Fri, 9 Dec 2022 09:37:47 +0000 (09:37 +0000)]
Merge "Add codes in client side to set/unset callback for retrieving sythesized pcm data" into tizen

17 months agoUpdate version (1.70.15) 49/285249/1
Suyeon Hwang [Thu, 8 Dec 2022 05:59:56 +0000 (14:59 +0900)]
Update version (1.70.15)

Change-Id: I3924400bb6249e2d9f5d8a21546c92e71953baaa
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
17 months agoTry to reprepare when IPC I/O error occurs 29/285229/3
Suyeon Hwang [Thu, 8 Dec 2022 02:02:12 +0000 (11:02 +0900)]
Try to reprepare when IPC I/O error occurs

- Issue:
TTS API will be failed when the engine is terminated after the client
library already sends request.

- Solution:
Current client library does not handle the network connection failed
situation because almost those situations are covered by reprepare
logic. However, if the engine is terminated without handling client IPC
message, client library should returns error.
Thus, this patch adds new retry logic when network error occurs. Through
this logic, some of the issue case will be covered. However, if engine
has critical issue, then this logic also can cover those situations.

Change-Id: I07075e0139d058f9f9bc84026a00309bf1815066
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
17 months agoAdd codes in client side to set/unset callback for retrieving sythesized pcm data 33/284933/4
wn.jang [Thu, 1 Dec 2022 07:48:34 +0000 (16:48 +0900)]
Add codes in client side to set/unset callback for retrieving sythesized pcm data

Change-Id: I938872f2546f8462eb8ffd10fc40b522909ee16c