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.3.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file crm_tensorflow-0.1.3.tar.gz
.
File metadata
- Download URL: crm_tensorflow-0.1.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204783f8fcd8343ba8b6fcf3843709d03d6e445d420f060263bd7d81c39da175 |
|
MD5 | 76b5170d848a04b7e8c8253c0b29c5d3 |
|
BLAKE2b-256 | d08d042314f5b0a0e6c0a2628b3180ba63adec885e2b2893a1cd2c9da6bf425d |
File details
Details for the file CRM_tensorflow-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: CRM_tensorflow-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.6 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 | eee8809d3a17710e0a7d733d9235e20878784be4d3d0d143308e509f64f9d04e |
|
MD5 | 8f9842065ec63d4198e9729d4df24913 |
|
BLAKE2b-256 | 0f609c60a0b312f9f8cfa53dbe86db5a7d7d4f02013d3c03ea30be8372749dee |