well i have a faster-whisper model and two files: when i put the first one into the model it returns me nonsense subtitles, BUT then i put the second file into model it work perfect
import wave
file_path = './BAD_FILE.wav'
with wave.open(file_path, 'rb') as wf:
channels = wf.getnchannels()
samplerate = wf.getframerate()
samplewidth = wf.getsampwidth()
nframes = wf.getnframes()
print(f"Channels: {channels}")
print(f"Sample Rate: {samplerate}")
print(f"Sample Width: {samplewidth} bytes")
print(f"Number of Frames: {nframes}")
print(f"Duration: {nframes / samplerate:.2f} seconds")
file_path = './GOOD_FILE.wav'
with wave.open(file_path, 'rb') as wf:
channels = wf.getnchannels()
samplerate = wf.getframerate()
samplewidth = wf.getsampwidth()
nframes = wf.getnframes()
print(f"Channels: {channels}")
print(f"Sample Rate: {samplerate}")
print(f"Sample Width: {samplewidth} bytes")
print(f"Number of Frames: {nframes}")
print(f"Duration: {nframes / samplerate:.2f} seconds")
this code gains me output
(bad file output)
Channels: 1
Sample Rate: 48000
Sample Width: 2 bytes
Number of Frames: 480000
Duration: 10.00 seconds
(good file output)
Channels: 1
Sample Rate: 11025
Sample Width: 2 bytes
Number of Frames: 390735
Duration: 35.44 seconds
is there any other information that affects model’s results? because i dont think that sample rate has so huge effect
New contributor
SOTERSOTERSOTERSOTERSOTERSOTER is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.