[ANNOUNCMENT] EchoPrintSharp: echoprint-codegen ported to C# and available as Portable Class Library (PCL) via NuGet

75 views
Skip to first unread message

Thomas Mielke

unread,
Nov 29, 2016, 8:50:20 AM11/29/16
to echoprint
I just ported the echoprint-codegen to C# and called it EchoPrintSharp. The PCL is available via Nuget and the source can be found on GitHub.

Nuget:

    Install-Package EchoPrintSharp

Note that I did not port the audio file handling as such things like using ffmpeg cannot be done in a PCL. Just feed mere PCM audio data to it.

How to use:

using EchoPrintSharp;
...
var pcmData = new Int16[441000]; // 40 seconds x 11,025Hz = 441,000 samples, for example
... // put your mono/11,025Hz audio data in pcmData here    
var echoPrint = new CodeGen();
string epCodes = echoPrint.Generate(pcmData);
 

If your audio data is not in mono/11,025Hz/16bin format, use this call:


...
string epCodes = Generate(pcmData, bitsPerSample, numberOfChannels, samplingrate)

It's that easy.

For testing purposes, I added a project TestEchoPrintSharp to the GitHub repo, showing how to get the raw audio data from a wav ressource and how to read mp3 or wav files using the NAudio library.

Happy coding!
Reply all
Reply to author
Forward
0 new messages