@@ -393,7 +393,7 @@ def write(file: FileDescriptorOrPath, data: AudioData, samplerate: int,
393393
394394def blocks (file : FileDescriptorOrPath , blocksize : int | None = None ,
395395 overlap : int = 0 , frames : int = - 1 , start : int = 0 ,
396- stop : int | None = None , dtype : str = 'float64' ,
396+ stop : int | None = None , dtype : dtype_str = 'float64' ,
397397 always_2d : bool = False , fill_value : float | None = None ,
398398 out : AudioData | None = None , samplerate : int | None = None ,
399399 channels : int | None = None , format : str | None = None ,
@@ -456,20 +456,20 @@ class _SoundFileInfo:
456456 """Information about a SoundFile"""
457457
458458 def __init__ (self , file , verbose ):
459- self .verbose = verbose
459+ self .verbose : bool = verbose
460460 with SoundFile (file ) as f :
461- self .name = f .name
462- self .samplerate = f .samplerate
463- self .channels = f .channels
464- self .frames = f .frames
465- self .duration = float (self .frames )/ f .samplerate
466- self .format = f .format
467- self .subtype = f .subtype
468- self .endian = f .endian
469- self .format_info = f .format_info
470- self .subtype_info = f .subtype_info
471- self .sections = f .sections
472- self .extra_info = f .extra_info
461+ self .name : str | int | Any = f .name
462+ self .samplerate : int = f .samplerate
463+ self .channels : int = f .channels
464+ self .frames : int = f .frames
465+ self .duration : float = float (self .frames )/ f .samplerate
466+ self .format : str = f .format
467+ self .subtype : str = f .subtype
468+ self .endian : str = f .endian
469+ self .format_info : str = f .format_info
470+ self .subtype_info : str = f .subtype_info
471+ self .sections : int = f .sections
472+ self .extra_info : str = f .extra_info
473473
474474 @property
475475 def _duration_str (self ):
0 commit comments