You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I copy/pasted the demo code to the file whisper.cs isntalled the packages in nuget. The only changes I made are changing the models (base to large) and the file name inside Default="" in the'f' Option. The code is besides taht really the same as the demo code of this repo!
The wav files are in the project folder and registered by whisper.net
But, unfortunateIy I get the following error message every time no matter which wav file I try:
at Whisper.net.Wave.WaveParser.InitializeAsync()
at Whisper.net.Wave.WaveParser.GetAvgSamplesAsync(CancellationToken cancellationToken)
at Whisper.net.WhisperProcessor.ProcessAsync(Stream waveStream, CancellationToken cancellationToken)+MoveNext()
at Whisper.net.WhisperProcessor.ProcessAsync(Stream waveStream, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at Program.<<Main>$>g__FullDetection|0_2(Options opt) in C:\Users\huddeij\RiderProjects\whisperTest\whisper2.cs:line 80
at Program.<<Main>$>g__FullDetection|0_2(Options opt) in C:\Users\huddeij\RiderProjects\whisperTest\whisper2.cs:line 80
at Program.<<Main>$>g__Demo|0_0(Options opt) in C:\Users\huddeij\RiderProjects\whisperTest\whisper2.cs:line 33
at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult`1 result, Func`2 action)
at Program.<Main>$(String[] args) in C:\Users\huddeij\RiderProjects\whisperTest\whisper2.cs:line 13
at Program.<Main>(String[] args)
I tried the sample wav files from this repo, audio records, converted into wav via cloudconvert and ffmpeg.
Environment:
MS Windows 11 Pro 22H2
.Net v7.0.203
Jetbrains Rider 2023.1.1
What am i doing wrong here?
The text was updated successfully, but these errors were encountered:
GFNiko
changed the title
Unhandled exception. Whisper.net.Wave.CorruptedWaveException: Invalid wave file RIFF header.
Error Message of "Invalid wave file RIFF header" with various valid wav files
May 3, 2023
I suspect you set the file in a different path or you passed a stream which is already consumed.
In order to debug this further you can display the first 4 chars in the header (at like 78 in the demo): using var fileStream = File.OpenRead(opt.FileName);
var buffer = new byte[4];
fileStream.Read(buffer, 0, 4);
Console.WriteLine(System.Text.Encoding.UTF8.GetString(buffer));
fileStream.Position = 0;
I copy/pasted the demo code to the file whisper.cs isntalled the packages in nuget. The only changes I made are changing the models (base to large) and the file name inside Default="" in the'f' Option. The code is besides taht really the same as the demo code of this repo!
The wav files are in the project folder and registered by whisper.net
But, unfortunateIy I get the following error message every time no matter which wav file I try:
The output before the error message:
I tried the sample wav files from this repo, audio records, converted into wav via cloudconvert and ffmpeg.
Environment:
MS Windows 11 Pro 22H2
.Net v7.0.203
Jetbrains Rider 2023.1.1
What am i doing wrong here?
The text was updated successfully, but these errors were encountered: