You can use the following code to convert .ogg to .wav in C#:
Add the NAudio library to your project. You can download it from https://github.com/naudio/NAudio.
Import the necessary namespaces:
using NAudio.Wave;
using NVorbis.NAudioSupport;
private static void ConvertToWav(string inputFile, string outputFile)
{
using (var vorbis = new VorbisWaveReader(inputFile))
{
WaveFileWriter.CreateWaveFile(outputFile, vorbis);
}
}
ConvertToWav
method:string inputFile = "input.ogg";
string outputFile = "output.wav";
ConvertToWav(inputFile, outputFile);
This code should properly convert .ogg to .wav using C#.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-07-04 11:36:31 +0000
Seen: 12 times
Last updated: Jul 04 '23
The content inside my buttons is not visible on the screen.
What causes peep and pop operations to produce invalid outputs?
What does the message "No tests found" from playwright VSCode mean?
Why does SVG fail to display in Safari, but functions properly in Chrome?
How to use hyperlinks in SharePoint List within Teams?
What is the meaning of the build error message "NoClassDefFoundError: org/apache/xpath/XPathAPI"?
What is the correct way to load the jQuery fullcalendar plugin in a div that is not visible?