tortoise-tts
tortoise-tts copied to clipboard
Missing attribute error whenever torchaudio.save is run
Whenever I run torchaudio.save('generated.wav', gen.squeeze(0).cpu, 24000)
I always gets an error of the "src" object in the "torchaudio" module not having any attributes!
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_15111\511151117.py in <module>
7 gen = tts.tts_with_preset(text, voice_samples=voice_samples, conditioning_latents=conditioning_latents,
8 preset=preset)
----> 9 torchaudio.save('generated.wav', gen.squeeze(0).cpu, 24000)
10 IPython.display.Audio('generated.wav')
c:\ProgramData\Anaconda3\lib\site-packages\torchaudio\backend\soundfile_backend.py in save(filepath, src, sample_rate, channels_first, compression, format, encoding, bits_per_sample)
421 "Using 16 bits per sample might be able to avoid this."
422 )
--> 423 subtype = _get_subtype(src.dtype, ext, encoding, bits_per_sample)
424
425 # sph is a extension used in TED-LIUM but soundfile does not recognize it as NIST format,
AttributeError: 'builtin_function_or_method' object has no attribute 'dtype'
It doesn't matter what it is, whether that be "dtype" or "ndim"!...
Even if I hypothetically inserted a line that included "src.[anything]" before line 423, I would get an error of no attribute😭