Change unit of synthesized PCM data when calculating xRT 80/298680/1
authorwn.jang <wn.jang@samsung.com>
Tue, 12 Sep 2023 08:57:06 +0000 (17:57 +0900)
committerwn.jang <wn.jang@samsung.com>
Tue, 12 Sep 2023 08:57:06 +0000 (17:57 +0900)
Change-Id: Ia0465b4c9dc248659c6c78a3a3c86242fa0b7dcf

server/ttsd_server.c

index b3e6665..5aa5fb3 100644 (file)
@@ -300,7 +300,7 @@ int ttsd_send_result(ttse_result_event_e event, const void* data, unsigned int d
                /* Calculate xRT */
                clock_gettime(CLOCK_MONOTONIC_RAW, &g_finish_playing);
                long long int time_processing = (uint64_t)TIME_DIFF(g_request_playing, g_finish_playing);
-               long long int time_speech = (long long int)(1000 * g_total_data_size * sizeof(short) / (rate * audio_type_bytes));
+               long long int time_speech = (long long int)(1000 * g_total_data_size * sizeof(char) / (rate * audio_type_bytes));
                double xRT = (double)(time_processing) / (double)time_speech;
                SLOG(LOG_INFO, tts_tag(), "[SERVER] time_processing : %lld, time_speech : %lld, total data size: %d", time_processing, time_speech, g_total_data_size);
                SLOG(LOG_INFO, tts_tag(), "[SERVER] xRT : %lf", xRT);