This repository contains code for JSAC 2021 "Semantic Communication Systems for Speech Transmission". The code is based on pytorch implementation according to the original code and the content of the paper.
.
├── dataset # Dataset
├── channel.py # Channel layer
├── config.py # The config of channel
├── custom_dataset.py
├── log # The folder where logs are saved
├── log.py # User-defined logger
├── make_dataset_t.py # Make dataset
├── metrics.py # Evaluation metrics of the model
├── model_thesis.py # model
├── README.md
├── results # The folder where model files and evaluation results are saved
│ └── saved_model_thesis_with_noise
│ ├── awgn
│ └── rayleigh
├── speech_processing.py # Data preprocessing includes normalization, de-normalization, sampling, and de-sampling
├── test_thesis.py # Model testing
├── train_thesis.py # Model training
└── utils.py # Other, include resampler, create folder, ...
- Python 3.8+ and Conda
- Environment
conda create -n deepsc_s python=3.8 conda activate deepsc_s python -m pip install -r requirements.txt
- The dataset adopted in this project can be found in Edinburgh DataShare, Please download this dataset and put them into ./dataset/raw_data folder. Then do the following:
mkdir dataset python make_dataset_t.py --sr 8000 --num_frame 128 --frame_size 0.016 --stride_size 0.016 --save_path ./dataset/deepsc/
- If you don't want to download the original dataset, you can use the data set we processed directly.
mkdir dataset cd ./dataset git clone https://github.com/linhl1218/deepsc-dataset.git mv deepsc-dataset deepsc
Example of testing model performance change under awgn channel SNR=10dB:
python test_thesis.py --channel_type awgn --snrs [10]
Train the model:
python train_thesis.py --channel_type awgn --num_epochs 400 --batch_size 16 --lr 0.001