6

pocketsphinx has a SWIG interface "pocketsphinx.i" to generate wrappers in multiple language and one of them is C#.

It is not clear how to run the swig command in Windows and how to use the resulting library in a NetCore C# project.

What are the steps required to generate the wrapper library and use it in a C# NetCore app?

bre_dev
  • 562
  • 3
  • 21
Pedro Lima
  • 93
  • 2
  • 5

2 Answers2

4

There is an official swig-based wrapper in github, you can compile it for Linux with Make or for Microsoft with CMake:

https://github.com/cmusphinx/pocketsphinx/tree/master/swig/csharp

You can also check

https://github.com/cmusphinx/pocketsphinx-unity-demo

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
  • Can you please articulate a bit more? Can you please provide an example of how to run the swig command and then use the resulting library in c#? – bre_dev Sep 23 '20 at 19:45
2

You can use SWIG to generate a C# wrapper for PocketSphinx lib, like it done here: https://github.com/cmusphinx/pocketsphinx-unity-demo/tree/master/Assets/Pocketsphinx

Mikolaytis
  • 921
  • 1
  • 12
  • 27