# Immersive Phobia Therapy through Adaptive Virtual Reality and Biofeedback
## 3 The PhoVR System
### Technologies and Performance Evaluation  
For developing the virtual environments, we used the following technologies:  
* Unity 3D [38]--a graphics engine with support for virtual reality;
* SteamVR plugin [39]--an extension for Unity 3D;
* Adobe Fuse [40]--used for building the 3D models of the audience;
* Adobe Mixamo [41]--an application used for adding animations to 3D models. With Adobe Mixamo, we rendered the various states of people in the audience, such as \"Interested\" or \"Not interested\";
* Microsoft Azure Speech to Text [42]--an application for analyzing the voice recorded with the microphone to generate text. The text is consequently analyzed to obtain statistics regarding speech rate and pauses between words.  
The performance of the virtual environments was tested by recording the scene's update and processing time at the frame level. To guarantee performance stability, the processing time should not fall below a value of 33 milliseconds per frame, which corresponds to a frequency of 30 frames per second.  
For acrophobia and claustrophobia therapy, the 3D environments were designed to run on the Oculus Quest 2 all-in-one HMD system.  
Performance tests were carried out on the Oculus Quest 2 all-in-one HMD system with the following configuration:  
* Processor--Qualcomm Snapdragon XR2 7 nm;
* Memory--6 GB--DDR5;
* Video card--Adreno 650 \(\times\) 7 nm;
* Storage--256 GB;
* Display refresh rate--72 Hz, 90 Hz, 120 Hz;
* Resolution--1832 \(\times\) 1920 (per eye).  
The virtual environment can also run on a laptop/desktop personal computer using an HMD VR device.  
The VR desktop system on which the performance tests were performed has the following configuration:  
* Processor--Ryzen 73,700 \(\times\) 3.6 GHz;
* Memory--32 GB--DDR4 3200 MHz;
* Video card: 1060 GTX--6 GB.  
The performance results are presented in Table 1.  
Figure 19: Performance statistics in real time.  
As can be seen from the table above, the minimum and average performance values are adequate for the safe running of the VR environments, without generating a state of dizziness in the patients caused by a too-low visual information update rate.  
Microsoft Azure Speech to Text (or Speech Recognition) enables the real-time transcription of audio sources into text. The service is trained using Microsoft's proprietary data and is offered as a cloud service, running on Microsoft's servers.  
Azure Speech to Text was integrated into the application for fear of public speaking therapy. The words that the user speaks during the application are processed with this platform. A request is made to the server (in the cloud) to obtain the text based on the audio stream generated by the user when speaking. The processing occurs in real time, and the obtained result is a text that is later processed to gather statistics such as speech rate, speech clarity, etc. Azure Speech to Text has several languages available, and the one chosen for the purpose of our application is English.  
The performance of Azure Speech to Text is very good, achieving more than 98% accuracy in the detection of spoken words. The duration of the requests to the server is a maximum of one second, and the duration of the text analysis until receiving the final result is also a maximum of one second. In conclusion, Azure Speech to Text performs well, and according to the tests carried out, it keeps up with the pace of the phrases and sentences spoken by the user within the application to provide results in real time.