This project focuses on reconstructing speech from EEG signals using deep learning techniques. It processes audio recordings from multiple participants, extracts features, reconstructs audio, and visualizes results.
src/: Source code directoryfeature_extractor.py: EEG and audio data processingaudio_constructor.py: Speech reconstructionconfig.py: Project configurationmodels.py: Model definitionsvisualization.py: Result visualization
main.py: Main execution scriptSingleWordProductionDutch-iBIDS/: Dataset directoryfeatures/: Extracted features storageresults/: Reconstruction results and visualizations
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Configure the project in
src/config.py - Run the main script:
python main.py
Key parameters in src/config.py:
num_jobs: Number of parallel jobs for processing (default: 20)extract_features: Whether to run feature extraction (TrueorFalse)construct: Whether to run the audio reconstruction process (TrueorFalse)visualization: Whether to generate visualizations (TrueorFalse)current_dir: The current working directorydataset_dir: Directory containing the dataset (SingleWordProductionDutch-iBIDS)features_dir: Directory where extracted features are storedresults_dir: Directory where the results (e.g., reconstructions, plots) will be savedno_of_mel_spectrograms: The number of mel spectral bins (default: 128)epochs: Number of epochs for model training (default: 100)batch_size: Batch size for model training (default: 128)num_folds: Number of folds for cross-validation (default: 10)
When enabled, the project generates:
- Correlation plots: Shows the bar plot for correlation between the predicted spectrograms by NeuroIncept Decoder Model and original spectrograms for all subjects
- STGI (Short-Time Geometric Image) plots: Displays Bar Plot of STGI metric for all Subjects
- Training history plots: Plots the history of the model's training process, Validation loss
- Spectrogram comparisons: Spectrograms generated by various model architectures
The project uses the SingleWordProductionDutch-iBIDS dataset. Place it in the directory specified by dataset_dir in config.py.
