From 702b5bcd8f0d4d8f1946bb56579d23bd2337a981 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Tue, 12 Sep 2023 17:57:06 +0900 Subject: [PATCH] Change unit of synthesized PCM data when calculating xRT Change-Id: Ia0465b4c9dc248659c6c78a3a3c86242fa0b7dcf --- server/ttsd_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ttsd_server.c b/server/ttsd_server.c index b3e6665..5aa5fb3 100644 --- a/server/ttsd_server.c +++ b/server/ttsd_server.c @@ -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); -- 2.7.4