Header Image

1. User Documentation


1.1 Getting Started

Features
Use Cases
System Requirements
Setup Overview
You will:
  1. Install Unity Editor (6000.0.58f2) through Unity Hub
  2. Create a Python virtual environment
  3. Install Python dependencies
  4. Open the Unity Project
  5. Point Unity to your system Python executable
  6. Perform calibration
  7. Set up the experiment
  8. Run real-time analysis
Folder Overview
 
Assets/
|─ Calibration Files/    # User-specific calibration JSON + WAV Recordings
|─ Logs/                 # Per-session CSV exports
|─ Scripts/
|  |─ Python/            # Python signal processing & calibration
|  |─ Unity/              
|     |─ Core/           # Core Unity controller
|     |─ Interfaces/     # Abstractions for capture, analysis, alert, and feedback
|     |─ UI/             # Visual components
|─ TrainingJSON/         # User-specific session settings (target goals)
            

1.2 Installation Guide

Install Unity
  1. Download Unity Hub
  2. Install Unity Editor 6000.0.58f2
  3. Clone or unzip the IVoice repository
  4. Open it from Unity Hub
Set Up Python
  1. Open a terminal and change directory to your desired location.
  2. Create a virtual environment and install the dependencies
  3.  
    python3 -m venv venv
    source venv/bin/activate
    
    pip install numpy torch torchaudio torchcodec soundfile pandas pysptk pydub praat-parselmouth
                
  4. Make sure ffmpeg is installed on your machine(for pydub)
  5.  
    sudo apt install ffmpeg
                
Link Python to Unity
  1. Open the Unity Project via Unity Hub
  2. In Unity hierarchy, find the Settings
  3. In the inspector, find the PythonPath.cs component, and set the path to:
  4.  
    /venv/bin/python
                
  5. To find the path to your virtual environment Python executable, use:
  6.  
    which python
                
Validate Installation
  1. Press Play in Unity
  2. Console should show Python engine startup
  3. The microphone gets initialized, and you can calibrate your voice with no issues
  4. UI shows idle streaming

1.3 Running the Application

Start Unity
  1. Before running Unity, you successfully linked Python to Unity as described above
  2. Make sure your microphone is connected and works properly
  3. Press Play
  4. Python engine boots in the background, and you get no errors in the console
  5. You get directed to the calibration step, and you can successfully calibrate your voice
  6. Set up your session goals in the setup UI
  7. Once the settings are set up, press the Record button to start a training session.
  8. Unity streams audio to Python and Python returns per-frame metrics. UI shows real-time feedback
Interpreting UI

1.4 Calibration Guide

Calibration Steps
  1. Background Noise (5s): Stay silent
  2. Sustained Vowel /a/ (5s): Produce a steady voice
  3. Sentence: (Running Speech): Read/Speak a natural sentence
  4. Unity will automatically save:
 
Assets/Calibration Files/
  background.wav
  sustained.wav
  sentence.wav
  calibration_data.json
            
Understanding Calibration Values
  1. backgroundThreshold: RMS noise floor
  2. sustainedAvgPitch/sustainedAvgLoudness: Baseline for sustained feedback
  3. sentenceAvgPitch/sentenceAvgLoudness: Baseline for running speech
  4. These baselines are used during "target band" determination for training

1.5 Logging & Data Export

Log Location?
 
Assets/Logs/
            
Each session gets its own non-overwriting file.
Columns Include

1.6 Troubleshooting

Python Engine Not Launching
No Microphone Detected
Unity Errors
High Latency
Uiowa