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.

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. cheong00 3,486 Reputation points Volunteer Moderator
    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.