I was able to write a file and play it using another program, but when I tried to read the same file using this library I got the error: Incorrect ChunkSize. Got[328044] Wanted[1765420]
I wrote the file with:
file := wav.File{
SampleRate: 8000,
SignificantBits: 16,
Channels: 1,
}
I tried to read with:
f, err := os.Open("output.wav")
if err != nil {
fmt.Println(err)
os.Exit(1)
}
stat, err := f.Stat()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
reader, err = wav.NewReader(f, stat.Size())
if err != nil {
fmt.Println(err)
os.Exit(1)
}