Merge pull request #3538 from fazledyn-or/develop

Fixed implementation of a special method
pull/3711/head
jzhang533 10 months ago committed by GitHub
commit 969f33999f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,6 +14,7 @@
# Modified from espnet(https://github.com/espnet/espnet) # Modified from espnet(https://github.com/espnet/espnet)
import io import io
import os import os
import sys
import h5py import h5py
import librosa import librosa
@ -98,7 +99,7 @@ class SoundHDF5File():
def __contains__(self, item): def __contains__(self, item):
return item in self.file return item in self.file
def __len__(self, item): def __len__(self):
return len(self.file) return len(self.file)
def __enter__(self): def __enter__(self):

@ -14,9 +14,12 @@
# Modified from espnet(https://github.com/espnet/espnet) # Modified from espnet(https://github.com/espnet/espnet)
from collections import OrderedDict from collections import OrderedDict
import io
import os
import kaldiio import kaldiio
import numpy as np import numpy as np
import soundfile import soundfile
import h5py
from .utility import feat_type from .utility import feat_type
from paddlespeech.audio.transform.transformation import Transformation from paddlespeech.audio.transform.transformation import Transformation
@ -401,7 +404,7 @@ class SoundHDF5File():
def __contains__(self, item): def __contains__(self, item):
return item in self.file return item in self.file
def __len__(self, item): def __len__(self):
return len(self.file) return len(self.file)
def __enter__(self): def __enter__(self):

Loading…
Cancel
Save