how to convert mp3 file to wav(or pcm) in memory ( in c# .net core 3.1 )

hongfei 1 Reputation point
2021-06-03T07:06:17.187+00:00

I have an application written using c# in asp.net core as docker ( os: centos) . My objective is to make a call to 3rd party service to download a mp3 file. Then I want to convert this file into wav (or pcm format). how to convert mp3 file to wav(or pcm) format in memory ( in .net core ) , i try to use NAudio (NAudio.wave) , but NAudio only run in Windows , don't work in asp.net core docker (os: Centos), Are there any cross-platform C# audio APIs ? or is there any easy way or any other solution?
Thanks a lot.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,138 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,201 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cheong00 3,471 Reputation points
    2021-06-03T07:15:57.953+00:00

    Try and see if these 2 libraries help. (I have no idea whether they decode in memory or not)

    https://www.nuget.org/packages?q=linux+mp3

    0 comments No comments