A non-official implementation of the Complex Ratio Mask (CRM) technique as a Tensorflow layer.
Project description
A non-official implementation of the Complex Ratio Mask (CRM) technique as a Tensorflow layer.
Implementation of the the Complex Ratio Mask (CRM) technique used in "DCCRN: Deep Complex Convolution Recurrent Network for Phase-Aware Speech Enhancement".
Installlation
pip install CRM_tensorflow
Usage
import tensorflow as tf
from CRM_tensorflow import ComplexRatioMask
# Input parameters
time_dim = 100
freq_dim = 257
batch_size = 100
# Define layer
crm_layer = ComplexRatioMask(masking_mode='E') # Other modes include 'C' and 'R'. See paper for more information.
# Random noisy signal split in real and imag. components
random_spectrogram_real = tf.random.normal((batch_size,time_dim, freq_dim))
random_spectrogram_imag = tf.random.normal((batch_size,time_dim, freq_dim))
# Random complex mask split in real and imag. components
random_mask_real = tf.random.normal((batch_size,time_dim, freq_dim))
random_mask_imag = tf.random.normal((batch_size,time_dim, freq_dim))
enhanced_speech_signal = crm_layer(random_spectrogram_real, random_spectrogram_imag, random_mask_real, random_mask_imag)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
crm_tensorflow-0.1.2.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file crm_tensorflow-0.1.2.tar.gz
.
File metadata
- Download URL: crm_tensorflow-0.1.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a044e34f531687ef62ee9dd7396223c047aeceec1e0438ee81e758d794ff647 |
|
MD5 | f6128c38fe5da983f19b5a14d04dd3a8 |
|
BLAKE2b-256 | 1749e8b4e9001b703063f81751c8410b049eefdf8ac9d53ea7db00fb7ce7951e |
File details
Details for the file CRM_tensorflow-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: CRM_tensorflow-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5672650a01b035d8bd72003bff8a76c22d9367fe70f0c2464bc020c8c0b7fc7 |
|
MD5 | 0a8dbcadf2777f4cef1a97a870b188a1 |
|
BLAKE2b-256 | 1beb1a0321e5ada07b589f95fb65f9e4cf3501d52b041481d1cf09dd004a5b1d |