Skip to content

Commit

Permalink
Merge pull request #3538 from fazledyn-or/develop
Browse files Browse the repository at this point in the history
Fixed implementation of a special method
  • Loading branch information
jzhang533 authored Mar 4, 2024
2 parents 2147d3b + 1a69344 commit 969f339
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion paddlespeech/audio/transform/perturb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Modified from espnet(https://github.com/espnet/espnet)
import io
import os
import sys

import h5py
import librosa
Expand Down Expand Up @@ -98,7 +99,7 @@ def __iter__(self):
def __contains__(self, item):
return item in self.file

def __len__(self, item):
def __len__(self):
return len(self.file)

def __enter__(self):
Expand Down
5 changes: 4 additions & 1 deletion paddlespeech/s2t/io/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
# Modified from espnet(https://github.com/espnet/espnet)
from collections import OrderedDict

import io
import os
import kaldiio
import numpy as np
import soundfile
import h5py

from .utility import feat_type
from paddlespeech.audio.transform.transformation import Transformation
Expand Down Expand Up @@ -401,7 +404,7 @@ def __iter__(self):
def __contains__(self, item):
return item in self.file

def __len__(self, item):
def __len__(self):
return len(self.file)

def __enter__(self):
Expand Down

0 comments on commit 969f339

Please sign in to comment.