Coder Social home page Coder Social logo

Comments (2)

jhakulin avatar jhakulin commented on May 16, 2024

@wxbool Could you please try with following instructions for Windows.

Pre-requisites:

  1. Install MSYS2 (needed for gcc compiler for Windows) from https://www.msys2.org/
  2. Install nuget.exe from https://learn.microsoft.com/en-us/nuget/install-nuget-client-tools
  • Nuget.exe installation is below assumed to be in c:/nuget folder

In MinGW terminal:

  1. Install gcc required by cgo
    $ pacman -S mingw-w64-ucrt-x86_64-gcc

  2. Install Speech SDK
    $ export SPEECHSDK_ROOT=/c/temp/speechsdk
    $ mkdir -p "$SPEECHSDK_ROOT"
    $ /c/nuget/nuget install Microsoft.CognitiveServices.Speech -o $SPEECHSDK_ROOT

  3. Set CGO flags for compiler/linker
    $ export CGO_CFLAGS="-I$SPEECHSDK_ROOT/Microsoft.CognitiveServices.Speech.1.25.0/build/native/include/c_api"
    $ export CGO_LDFLAGS="-L$SPEECHSDK_ROOT/Microsoft.CognitiveServices.Speech.1.25.0/build/native/x64/Release -lMicrosoft.CognitiveServices.Speech.core"

  4. Copy Speech SDK dlls to the same folder with Go sample
    $ cd /c//cognitive-services-speech-sdk-go/samples
    $ cp /c/temp/speechsdk/Microsoft.CognitiveServices.Speech.1.25.0/runtimes/win-x64/native/*.dll .

  5. Build and run the sample
    $ /c/'Program Files'/go/bin/go clean
    $ /c/'Program Files'/go/bin/go build

    $ /c/'Program Files'/go/bin/go run main.go /c/temp/whatstheweatherlike.wav speech_recognizer:RecognizeOnceFromWavFile

Session Started (ID= XXX )
Session Stopped (ID= XXX)
Got a recognition!
What's the weather like?

from cognitive-services-speech-sdk-go.

ralph-msft avatar ralph-msft commented on May 16, 2024

Closing due to inactivity

from cognitive-services-speech-sdk-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.