Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chomeyama/wavehax
/ functions
Functions
159 in github.com/chomeyama/wavehax
⨍
Functions
159
◇
Types & classes
39
↳
Endpoints
1
↓ 7 callers
Method
__init__
Initialize the ComplexConv1d module. Args: in_channels (int): Number of input channels. out_channels (int):
wavehax/modules/complex.py:104
↓ 6 callers
Function
read_hdf5
Reads a dataset from an HDF5 file. Args: hdf5_name (str): Path to the HDF5 file. hdf5_path (str): Dataset path within the HD
wavehax/utils/utils.py:85
↓ 6 callers
Function
read_txt
Read lines from a text file, removing newline characters. Args: file_list (str): Path to the text file containing filenames. Re
wavehax/utils/utils.py:178
↓ 4 callers
Method
__init__
Initialize the NormLayer module. Args: channels (int): Number of input features. eps (float, optional): A sm
wavehax/modules/norm.py:14
↓ 4 callers
Method
__init__
Initialize the PeriodDiscriminator module. Args: period (int): Period to split the waveform for 2D convolution processin
wavehax/discriminators/univnet.py:38
↓ 4 callers
Method
inverse
Perform the inverse Short-Time Fourier Transform (iSTFT) to reconstruct the waveform from the complex spectrogram. Args:
wavehax/modules/stft.py:120
↓ 3 callers
Method
normalize
Normalize the real and imaginary parts of a complex tensor. Args: real (Tensor): The real part of the complex tensor wit
wavehax/modules/complex.py:329
↓ 3 callers
Method
normalize
Apply normalization to the input tensor. Args: x (Tensor): Input tensor with shape (batch, channels, ...). d
wavehax/modules/norm.py:34
↓ 3 callers
Function
path_replace
Modify the file path by replacing the input directory with the output directory, and optionally changing the file extension. Args:
wavehax/bin/extract_features.py:77
↓ 3 callers
Function
read_audio
Reads an audio file, resamples it to the target sampling frequency if necessary, and returns the audio waveform as a numpy array. Args:
wavehax/utils/utils.py:56
↓ 2 callers
Method
__init__
Initilize PQMF module. The cutoff_ratio and beta parameters are optimized for #num_split = 4. See dicussion in https://github.com/kan
wavehax/modules/decomposer.py:70
↓ 2 callers
Method
__init__
Initialize the WavehaxGenerator module. Args: in_channels (int): Number of conditioning feature channels. ch
wavehax/generators/wavehax.py:35
↓ 2 callers
Function
_pchip_end_slopes
dx: (B, N-1) or (N-1,) positive step sizes delta: (B, N-1) or (N-1,) slopes between points returns endpoint derivatives (d0, dn) sh
wavehax/modules/PchipF0UpsamplerTorch.py:22
↓ 2 callers
Method
_write_to_tensorboard
Write training loss metrics to TensorBoard. Args: loss (Dict): Dictionary containing loss metrics.
wavehax/bin/train.py:470
↓ 2 callers
Function
complex_conv
Perform complex convolution by combining the real and imaginary components. The complex convolution is defined as: - real_output = real_
wavehax/modules/complex.py:72
↓ 2 callers
Function
complex_weight_init
Initialize weights for a complex-valued neural network layer. This function creates a complex-valued weight matrix with orthogonal initializ
wavehax/modules/complex.py:27
↓ 2 callers
Function
round_half_to_even_np32
Emulate np.round(x.astype(np.float32)) on GPU for non-negative x. Operates in float32 domain and returns float32.
wavehax/modules/PchipF0UpsamplerTorch.py:6
↓ 2 callers
Method
save_checkpoint
Save the current state of the model to a checkpoint. Args: ckpt_path (str): Path to save the checkpoint file.
wavehax/bin/train.py:98
↓ 2 callers
Function
validate_length
Validates and adjusts the lengths of feature arrays and corresponding audio data for alignment during audio processing. If audio data is prov
wavehax/utils/utils.py:214
↓ 1 callers
Method
__init__
Initialize the ConvNeXtBlock2d module. Args: channels (int): Number of input and output channels for the block.
wavehax/modules/resblock.py:35
↓ 1 callers
Method
__init__
Initialize the STFT module. Args: n_fft (int): Number of Fourier transform points (FFT size). hop_length (in
wavehax/modules/stft.py:67
↓ 1 callers
Method
__init__
Initialize the AdaptiveConv1d module. Args: in_channels (int): Number of input channels. out_channels (int):
wavehax/modules/conv.py:66
↓ 1 callers
Method
__init__
Initialize the AdversarialLoss module. Args: average_by_discriminators (bool, optional): If True, the loss is averaged o
wavehax/losses/adv.py:19
↓ 1 callers
Method
_check_eval_interval
Check if it's time to evaluate the model.
wavehax/bin/train.py:491
↓ 1 callers
Method
_check_length
Assert the audio and feature lengths are correctly adjusted for upsampling.
wavehax/bin/train.py:577
↓ 1 callers
Method
_check_log_interval
Check if it's time to log training metrics.
wavehax/bin/train.py:496
↓ 1 callers
Method
_check_save_interval
Check if it's time to save a checkpoint.
wavehax/bin/train.py:479
↓ 1 callers
Method
_check_train_finish
Check if training should be finished.
wavehax/bin/train.py:509
↓ 1 callers
Method
_eval_epoch
Evaluate model one epoch.
wavehax/bin/train.py:306
↓ 1 callers
Method
_eval_step
Perform a single evaluation step on a given batch. Args: batch (Tuple): A tuple containing batched data.
wavehax/bin/train.py:263
↓ 1 callers
Method
_forward_batched
Batched path for B > 1. Strategy: - pack voiced x,y per batch into padded tensors of shape (B, maxNv) - compute
wavehax/modules/PchipF0UpsamplerTorch.py:149
↓ 1 callers
Method
_forward_single
Fast path for B==1. This mirrors the exact SciPy-matching single-sample version you already validated.
wavehax/modules/PchipF0UpsamplerTorch.py:73
↓ 1 callers
Method
_generate_and_save_intermediate_result
Generate and save intermediate results during training. This method performs intermediate result visualization and logging during the trainin
wavehax/bin/train.py:347
↓ 1 callers
Method
_train_epoch
Train the model for one complete epoch.
wavehax/bin/train.py:239
↓ 1 callers
Method
_train_step
Perform a single training step on a given batch. Args: batch (Tuple): A tuple containing batched data.
wavehax/bin/train.py:159
↓ 1 callers
Method
analysis
Decompose the input signal into num_split subscale signals. Args: x (Tensor): Input signal with shape (B, 1, T).
wavehax/modules/decomposer.py:130
↓ 1 callers
Function
check_filename
Check if the filenames in two lists (without extensions) are identical. Args: list1 (List[str]): First list of file paths or names.
wavehax/utils/utils.py:193
↓ 1 callers
Function
compute_statistics
Compute and save statistics (mean and variance) for normalization of acoustic features. This function processes each feature specified in th
wavehax/bin/compute_statistics.py:31
↓ 1 callers
Function
convert_to_continuous_f0
Converts an F0 sequence with intermittent zero values into a continuous F0 array by linearly interpolating over non-zero values. Args:
wavehax/utils/features.py:63
↓ 1 callers
Function
design_prototype_filter
Design a prototype filter for Pseudo Quadrature Mirror Filter (PQMF) banks. Reference: - "A Kaiser window approach for the design of
wavehax/modules/decomposer.py:25
↓ 1 callers
Function
drop_path
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created
wavehax/modules/drop.py:14
↓ 1 callers
Function
feature_list_create
Create a list file containing paths to feature files. Args: audio_scp (str): Path to the SCP file that lists input audio files.
wavehax/bin/extract_features.py:143
↓ 1 callers
Method
forward
Calculate forward propagation. Args: real (Tensor): Real part of the input tensor with shape (batch, channels, length).
wavehax/modules/complex.py:164
↓ 1 callers
Method
forward
Single-level forward DWT using Haar wavelet. Args: x (Tensor): Input tensor of shape (B, C, T). Returns:
wavehax/modules/decomposer.py:270
↓ 1 callers
Method
forward
Apply layer normalization to the input tensor. Args: x (Tensor): Input tensor with shape (batch, channels, height, width
wavehax/modules/norm.py:96
↓ 1 callers
Method
inference
(self, cond: Tensor, f0: Tensor)
wavehax/generators/wavehax.py:181
↓ 1 callers
Method
inverse
Applies the inverse DWT to reconstruct a signal from its components. Args: low (Tensor): Low-frequency component.
wavehax/modules/decomposer.py:288
↓ 1 callers
Function
is_power_of_two
(n: int)
wavehax/modules/decomposer.py:21
↓ 1 callers
Method
load_checkpoint
Load the model state from a checkpoint. Args: ckpt_path (str): Path to the checkpoint file to be loaded. load_only_pa
wavehax/bin/train.py:131
↓ 1 callers
Function
main
Run the training process based on the provided configuration. Args: cfg (DictConfig): Configuration parameters for training.
wavehax/bin/train.py:585
↓ 1 callers
Function
main
Run the decoding process to generate audio waveforms from acoustic features. This function: - Loads a pre-trained GAN-based vocoder mode
wavehax/bin/decode.py:35
↓ 1 callers
Function
main
(cfg: DictConfig)
wavehax/bin/compute_statistics.py:78
↓ 1 callers
Function
main
(cfg: DictConfig)
wavehax/bin/extract_features.py:268
↓ 1 callers
Function
main
Profile model parameters and MACs.
wavehax/bin/profile.py:20
↓ 1 callers
Function
path_create
Create directories and prepare paths for feature files. Args: audio_paths (List[str]): List of input audio file paths. in_di
wavehax/bin/extract_features.py:58
↓ 1 callers
Function
pd_indexing1d
Perform pitch-dependent indexing for temporal sequences. This function applies pitch-dependent dilation to the input tensor `x`, retrieving
wavehax/modules/conv.py:21
↓ 1 callers
Function
pd_indexing2d
Perform pitch-dependent indexing for time-frequency feature maps. This function retrieves elements from a time-frequency map using pitch-dep
wavehax/modules/conv.py:118
↓ 1 callers
Function
read_yaml
Reads a YAML configuration file and returns its contents as a dictionary. Args: file_path (str): Path to the YAML file. Returns
wavehax/utils/utils.py:41
↓ 1 callers
Method
run
Execute the training loop.
wavehax/bin/train.py:86
↓ 1 callers
Method
synthesis
Reconstruct the full-scale signal from subscale signals. Args: xs (List[Tensor]): List of subscale signals, each with sh
wavehax/modules/decomposer.py:146
↓ 1 callers
Function
to_log_magnitude_and_phase
Convert real and imaginary components of a complex signal to log-magnitude and phase. Args: real (Tensor): Real part of the complex
wavehax/modules/stft.py:15
↓ 1 callers
Function
to_real_imaginary
Convert log-magnitude and implicit phase wrapping back to real and imaginary components of a complex signal. Args: log_magnitude (Te
wavehax/modules/stft.py:35
↓ 1 callers
Function
write_hdf5
Writes a dataset to an HDF5 file, optionally overwriting existing datasets. Args: hdf5_name (str): HDF5 file path. hdf5_path
wavehax/utils/utils.py:112
Method
__call__
Convert a list of audio-feature pairs into batched tensors. Args: batch (List): List of tuples containing audio, features, and F0
wavehax/bin/train.py:537
Method
__getitem__
Get the specified index data. Args: idx (int): Index of the item. Returns: list: [filename (optiona
wavehax/datasets/audio_feat_dataset.py:131
Method
__getitem__
Get the specified index data. Args: idx (int): Index of the item. Returns: list: [filename (optiona
wavehax/datasets/audio_feat_dataset.py:214
Method
__init__
( self, drop_prob: Optional[float] = 0.0, scale_by_keep: Optional[bool] = True )
wavehax/modules/drop.py:44
Method
__init__
Initialize the ComplexConv2d module. Args: in_channels (int): Number of input channels. out_channels (int):
wavehax/modules/complex.py:186
Method
__init__
Initialize the ComplexActivation module. Args: activation (ModuleType): The activation function to apply to the real and
wavehax/modules/complex.py:270
Method
__init__
Initialize the ComplexNormLayer module. Args: channels (int): Number of channels (features) in the input. ep
wavehax/modules/complex.py:306
Method
__init__
Initialize the ComplexBatchNorm1d module. Args: channels (int): Number of input channels. eps (float, option
wavehax/modules/complex.py:451
Method
__init__
Initialize the ComplexLayerNorm1d module. Args: channels (int): Number of input channels (features). framewi
wavehax/modules/complex.py:561
Method
__init__
Initialize the ComplexBatchNorm2d module. Args: channels (int): Number of input channels. eps (float, option
wavehax/modules/complex.py:610
Method
__init__
Initialize the ComplexLayerNorm2d module. Args: channels (int): Number of input channels. framewise (bool, o
wavehax/modules/complex.py:664
Method
__init__
Initialize the ComplexConvNeXtBlock2d module. Args: channels (int): Number of input and output channels for the block.
wavehax/modules/resblock.py:115
Method
__init__
(self, scale_factor: int)
wavehax/modules/PchipF0UpsamplerTorch.py:58
Method
__init__
Initialize the MelSpectrogram module. Args: sample_rate (int): Sampling frequency of input waveforms. hop_le
wavehax/modules/stft.py:168
Method
__init__
Initilize MultiStream1d module. Args: num_split (int): Number of num_split to decompose the input signal into. taps (
wavehax/modules/decomposer.py:176
Method
__init__
Initialize the DWT1d module. Args: num_split (int): Number of subscales (must be a power of two).
wavehax/modules/decomposer.py:254
Method
__init__
Initialize the LayerNorm1d module. Args: channels (int): Number of input features. eps (float, optional): A
wavehax/modules/norm.py:75
Method
__init__
Initialize the BatchNorm1d module. Args: channels (int): Number of input features. eps (float, optional): A
wavehax/modules/norm.py:111
Method
__init__
Initialize the LayerNorm2d module. Args: channels (int): Number of input features. framewise (bool, optional
wavehax/modules/norm.py:187
Method
__init__
Initialize the BatchNorm2d module. Args: channels (int): Number of input features. eps (float, optional): A
wavehax/modules/norm.py:224
Method
__init__
Initialize AdaptiveConv2d module. Args: in_channels (int): Number of input channels. out_channels (int): Num
wavehax/modules/conv.py:189
Method
__init__
Initialize the HiFiGANMultiPeriodDiscriminator module. Args: periods (List[int]): List of periods for each period discri
wavehax/discriminators/univnet.py:140
Method
__init__
Initilize the SpectralDiscriminator module. Args: fft_size (int): Number of Fourier transform points for STFT.
wavehax/discriminators/univnet.py:183
Method
__init__
Initilize the UnivNetMultiResolutionDiscriminator module. Args: fft_sizes (List[int]): List of FFT sizes for each spectr
wavehax/discriminators/univnet.py:276
Method
__init__
Initilize the MultiResolutionMultiPeriodDiscriminator module. Args: periods (List[int]): List of periods for the HiFi-GA
wavehax/discriminators/univnet.py:336
Method
__init__
Initialize the ComplexWavehaxGenerator module. Args: in_channels (int): Number of conditioning feature channels.
wavehax/generators/wavehax.py:195
Method
__init__
Initialize the MultiScaleWavehaxGenerator module. Args: in_channels (int): Number of conditioning feature channels.
wavehax/generators/wavehax.py:348
Method
__init__
Initialize the AudioFeatDataset. Args: sample_rate (int): Sampling frequency of the audio. hop_length (int):
wavehax/datasets/audio_feat_dataset.py:37
Method
__init__
Initialize the FeatDataset. Args: sample_rate (int): Sampling frequency of the audio. hop_length (int): Hop
wavehax/datasets/audio_feat_dataset.py:181
Method
__init__
Initialize the MelSpectralLoss module. Args: sample_rate (int): Sampling frequency of input waveforms. hop_l
wavehax/losses/spectral.py:15
Method
__init__
Initialize the FeatureMatchingLoss module. Args: average_by_layers (bool, optional): If True, the loss is averaged over
wavehax/losses/adv.py:112
Method
__init__
Initialize Trainer. Args: cfg (dict): Configuration dictionary loaded from a YAML file. steps (int): Initial count of
wavehax/bin/train.py:47
Method
__init__
Initialize the customized collater. Args: sample_rate (int): Sampling frequency. hop_length (int): Hop size for auxil
wavehax/bin/train.py:518
Method
__len__
Return the number of items in the dataset. Returns: int: Dataset size.
wavehax/datasets/audio_feat_dataset.py:168
Method
__len__
Return the number of items in the dataset. Returns: int: Dataset size.
wavehax/datasets/audio_feat_dataset.py:245
Function
_filename
(x)
wavehax/utils/utils.py:205
Method
_hinge_adv_loss
Calculate hinge loss for generator.
wavehax/losses/adv.py:96
next →
1–100 of 159, ranked by callers