Skip to content

TypeError: No format specified and unable to get format from file extension: 'samples/\\.wav' #7

@carlosmatthews

Description

@carlosmatthews

When I try to run the program, it recognizes a file older than 1 hour, this error occurs, it seems to have to do with how it names the files into which it segments the original audio. To name the files it uses letters (A-Z) and when the letters are finished it begins to use symbols like: "/". I'm not sure but I think this may be the problem and you should try changing it by using names to name the segments

Traceback (most recent call last):
File "recognize.py", line 60, in
split_into_frames('current.wav')
File "recognize.py", line 55, in split_into_frames
sf.write('samples/{}.wav'.format(chr(int(i/50)+65)), tmp_batch, sr) # new library soundfile as sf remplace librosa.ouput # modificacion carlos
File "C:\Python38\lib\site-packages\soundfile.py", line 314, in write
with SoundFile(file, 'w', samplerate, channels,
File "C:\Python38\lib\site-packages\soundfile.py", line 627, in init
self._info = _create_info_struct(file, mode, samplerate, channels,
File "C:\Python38\lib\site-packages\soundfile.py", line 1416, in _create_info_struct
format = _get_format_from_filename(file, mode)
File "C:\Python38\lib\site-packages\soundfile.py", line 1457, in _get_format_from_filename
raise TypeError("No format specified and unable to get format from "
TypeError: No format specified and unable to get format from file extension: 'samples/\.wav'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions