Skip to main content

A non-official implementation of the Complex Ratio Mask (CRM) technique as a Pytorch module.

Project description

A non-official implementation of the Complex Ratio Mask (CRM) technique as a Pytorch module.

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_pytorch

Usage

import torch
from CRM_pytorch import ComplexRatioMask

# Create instances of CRMLayer with every mode
crm = ComplexRatioMask(masking_mode='E') # Other modes include 'C' and 'R'. See paper for more information.

# Input parameters
batch_size = 32
time_steps = 100
freq_bins = 257

# Dummy input data (numpy first, then torch)
x_real = torch.randn(batch_size, time_steps, freq_bins, dtype=torch.float32)
x_imag = torch.randn(batch_size, time_steps, freq_bins, dtype=torch.float32)
mask_real = torch.ones(batch_size, time_steps, freq_bins, dtype=torch.float32)
mask_imag = torch.ones(batch_size, time_steps, freq_bins, dtype=torch.float32)

# Forward pass through the layer
estimated_speech = crm_layer_e(x_real, x_imag, mask_real, 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_pytorch-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crm_pytorch-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file crm_pytorch-0.1.0.tar.gz.

File metadata

  • Download URL: crm_pytorch-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for crm_pytorch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77d526a12858d8ab9cfbdf6d50536441536e25626b1753efd642c0f1c3888194
MD5 863ed0cc216045eedf70dcbe5f48f6f2
BLAKE2b-256 98fe2e7701dc102b460b814f33b5ccf23a8bec17a514d5726105767d4b655edb

See more details on using hashes here.

File details

Details for the file crm_pytorch-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: crm_pytorch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for crm_pytorch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7c4f417a9121bc2bcf97c7a78b75bf84369a6e895b378e2f389988ddab37576
MD5 7843303f2d60411ce38d843b16033828
BLAKE2b-256 569304ddd6c8cdfc9d04e3252eee601be2300dee5e76dfaab239bb74ffcea8fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page