c++node.jsgstreamerspeech-to-textmu-law

Nodejs/c++ addon - getting error "undefined symbol: speech_config_from_subscription" from Microsoft speech SDK on ubuntu 18.4 server


Actually, I want to do speech transcription with passing MULAW (g711) audio format to microsoft-speech-sdk (Nodejs), but MULAW streaming audio format is not supported to microsoft-speech-sdk (Nodejs). So, for this required GStreamer with C++.

So, I'm going to create node/c++ addon for this. but I am facing below error.

1|server  | node /home/*****Transation/server.js: symbol lookup error: /home/*****Transation/stream-translation/cpp_asr/build/Release/accumulate.node: undefined symbol: speech_config_from_subscription

Installed the Speech SDK using this link.

Using reference for addon link.


Solution

  • I got the solution, Just coped this libMicrosoft.CognitiveServices.Speech.core.so library into /usr/lib folder and modified binding.gyp file. it is working fine.

    {
      "targets": [
        {
          "target_name": "transcription",
          "sources": ["src/streamingAsr.cpp"],
          "cflags": ["-Wall", "-std=c++17"],
          "cflags!": ["-fno-exceptions"],
          "cflags_cc!": ["-fno-exceptions"],
          "include_dirs": [
            "/home/delaplexTransation/speechsdk/include/cxx_api",
            "/home/delaplexTransation/speechsdk/include/c_api",
            "<!(node -e \"require('nan')\")",
            "<!(node -e \"require('streaming-worker-sdk')\")"
          ],
          "libraries": [
            "/usr/lib/libMicrosoft.CognitiveServices.Speech.core.so"
          ]
        }
      ]
    }