# Application of ChatGPT-Based Digital Human in Animation Creation
## 5 Testing and Analysis
### Animation Creation Interaction and Data Analysis
#### 5.2.2 Distance between Time Test  
The API transmission process of ASR, TTS, and ChatGPT involves sending requests to the server, receiving server responses, and synthesizing corresponding audio, text, and other data. Let us consider the function expression for Baidu Intelligent Cloud ASR:  
Figure 9: ChatGPT digital human–character interaction history.  
Let \(A_{d}\) be the start time of the audio recording sent to the server and \(A_{r}\) be the reception time of the server's response sent to the Open AI server. The time difference \(A_{d}\) can be calculated using the following formula:  
\[A_{d}=A_{r}-A_{a} \tag{1}\]  
Let \(A_{d}\) denote the time difference between sending the audio recording and the reception by the Open AI server. \(A_{r}\) denotes the reception time when the Baidu Intelligent Cloud server sends the response to be sent to the Open AI server. \(A_{a}\) denotes the start time when the audio recording is sent to the Baidu Intelligent Cloud server.  
Next, let us consider the TTS function expression for Microsoft Azure:  
Let \(T_{a}\) be the start time of the Open AI response data sent to the Microsoft server, \(T_{r}\) be the reception time of the Microsoft server analyzing the data to synthesize the audio data to be sent to the client, and \(T_{d}\) be the time difference between the two. It is expressed by the following formula:  
\[T_{d}=T_{r}-T_{a} \tag{2}\]  
where \(T_{d}\) denotes the time difference between the time Open AI sends the text data and the time the audio data are received at the client. \(T_{a}\) denotes the time the audio data are received at the client. \(T_{a}\) denotes the start time when Open AI sends the text to the Microsoft server.  
Finally, let us consider ChatGPT expressed as a function of data transfer through the API.  
Set \(C_{d}\) as the time difference between the two, and its formula is:  
\[C_{d}=T_{a}-A_{r} \tag{3}\]  
where \(C_{d}\) denotes the time difference between the reception of the text data by the Open AI server and the reception by the Microsoft server.  
Set \(G\) as the total time difference. The data were analyzed by the following. The data in Table 2 are the results of the experimental process.  
Based on the above data analysis, \(A_{d}\) was generally within 1 s, with only 1 or 2 tests showing higher values of over 6 s out of 15 and 48 times, indicating that the ASR recognition time of Baidu Intelligent Cloud is relatively fast, but there were a few instances with longer waiting times due to multiple recognitions. The fluctuating value of \(C_{d}\) ranged from 3 to 9 s, indicating that ChatGPT's responses through Open AI take time, especially for more-professional and -difficult questions that require a longer processing time. The fluctuating value of \(T_{d}\) is relatively large, ranging from 2 to 8 s, indicating that TTS takes a longer time to synthesize speech through the API.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Time (s)** & \(A_{d}\) & \(T_{d}\) & \(C_{d}\) & \(G\) \\ \hline \multirow{3}{*}{1-3} & \(<\)1 & 2 & 3 & 5 \\  & 1 & 2 & 6 & 9 \\  & 1 & 8 & 8 & 17 \\ \hline \multirow{3}{*}{4–5} & 1 & 3 & 3 & 7 \\  & \(<\)1 & 3 & 4 & 7 \\ \hline \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) \\ \hline \multirow{3}{*}{48–50} & 6 & 2 & 3 & 11 \\  & \(<\)1 & 6 & 7 & 14 \\ \cline{1-1}  & 1 & 5 & 8 & 14 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Number of times and time difference between ASR, TTS, and ChatGPT data exchanges in the form of APIs.