All Projects β†’ soundhound β†’ houndify-sdk-go

soundhound / houndify-sdk-go

Licence: MIT license
The official Houndify SDK for Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to houndify-sdk-go

octopus
On-device speech-to-index engine powered by deep learning.
Stars: ✭ 30 (+30.43%)
Mutual labels:  voice-recognition, speech-recognition, voice-search
Voice
🎀 React Native Voice Recognition library for iOS and Android (Online and Offline Support)
Stars: ✭ 993 (+4217.39%)
Mutual labels:  voice-recognition, speech-recognition
Sonus
πŸ’¬ /so.nus/ STT (speech to text) for Node with offline hotword detection
Stars: ✭ 532 (+2213.04%)
Mutual labels:  voice-recognition, speech-recognition
Vosk Api
Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Stars: ✭ 1,357 (+5800%)
Mutual labels:  voice-recognition, speech-recognition
Speech To Text Benchmark
speech to text benchmark framework
Stars: ✭ 481 (+1991.3%)
Mutual labels:  voice-recognition, speech-recognition
Mycroft Precise
A lightweight, simple-to-use, RNN wake word listener
Stars: ✭ 481 (+1991.3%)
Mutual labels:  voice-recognition, speech-recognition
Nativescript Speech Recognition
πŸ’¬ Speech to text, using the awesome engines readily available on the device.
Stars: ✭ 72 (+213.04%)
Mutual labels:  voice-recognition, speech-recognition
Cheetah
On-device streaming speech-to-text engine powered by deep learning
Stars: ✭ 383 (+1565.22%)
Mutual labels:  voice-recognition, speech-recognition
Swiftspeech
A speech recognition framework designed for SwiftUI.
Stars: ✭ 149 (+547.83%)
Mutual labels:  voice-recognition, speech-recognition
Vosk
VOSK Speech Recognition Toolkit
Stars: ✭ 182 (+691.3%)
Mutual labels:  voice-recognition, speech-recognition
Voice Overlay Android
πŸ—£ An overlay that gets your user’s voice permission and input as text in a customizable UI
Stars: ✭ 189 (+721.74%)
Mutual labels:  voice-recognition, speech-recognition
KeenASR-Android-PoC
A proof-of-concept app using KeenASR SDK on Android. WE ARE HIRING: https://keenresearch.com/careers.html
Stars: ✭ 21 (-8.7%)
Mutual labels:  voice-recognition, speech-recognition
Voice Overlay Ios
πŸ—£ An overlay that gets your user’s voice permission and input as text in a customizable UI
Stars: ✭ 440 (+1813.04%)
Mutual labels:  voice-recognition, speech-recognition
react-native-spokestack
Spokestack: give your React Native app a voice interface!
Stars: ✭ 53 (+130.43%)
Mutual labels:  voice-recognition, speech-recognition
Rhino
On-device speech-to-intent engine powered by deep learning
Stars: ✭ 406 (+1665.22%)
Mutual labels:  voice-recognition, speech-recognition
Asr benchmark
Program to benchmark various speech recognition APIs
Stars: ✭ 71 (+208.7%)
Mutual labels:  voice-recognition, speech-recognition
voce-browser
Voice Controlled Chromium Web Browser
Stars: ✭ 34 (+47.83%)
Mutual labels:  voice-recognition, speech-recognition
spokestack-android
Extensible Android mobile voice framework: wakeword, ASR, NLU, and TTS. Easily add voice to any Android app!
Stars: ✭ 52 (+126.09%)
Mutual labels:  voice-recognition, speech-recognition
Spokestack Python
Spokestack is a library that allows a user to easily incorporate a voice interface into any Python application.
Stars: ✭ 103 (+347.83%)
Mutual labels:  voice-recognition, speech-recognition
leopard
On-device speech-to-text engine powered by deep learning
Stars: ✭ 354 (+1439.13%)
Mutual labels:  voice-recognition, speech-recognition

Houndify SDK for Go Build Status GoDoc

houndify-sdk-go is the official Houndify SDK for the Go programming language.

The SDK allows you to make voice and text queries to the Houndify API. The SDK comes with a fully functional example app that demonstrates usage and the various SDK features. The SDK has no third party dependencies.

Requirements

Installing

To use the SDK and/or example app, you will need a client ID and client key. You can get those after creating a Houndify account and registering a client.

Once you have set your $GOPATH, you can use both the Go Houndify SDK and example app.

go get github.com/soundhound/houndify-sdk-go

The example app will be compiled and available at $GOPATH/bin/houndify-sdk-go and the SDK will be ready to import and use.

Example App

example.go provides a working example using the SDK.

The example app features three modes of interacting with the Houndify API:

  1. Voice
  2. Text
  3. Stdin Interactive Text

To run the voice search:

houndify-sdk-go --id YOUR_CLIENT_ID --key YOUR_CLIENT_KEY --voice ./test_audio/whattimeisitindenver.wav

To run a text search:

houndify-sdk-go --id YOUR_CLIENT_ID --key YOUR_CLIENT_KEY --text "tell me a joke"

To run an interactive text search:

houndify-sdk-go --id YOUR_CLIENT_ID --key YOUR_CLIENT_KEY --stdin

You will then be prompted to type a query.

After Houndify replies with a response, you can follow up with additional text queries. Houndify will keep track of the conversation history, and interpret new queries in the context of previous ones.

An example set of queries:

  • "what is two plus six"
  • "minus 4"
  • "what is the square root of that"

Instead of using the --id and --key flags, you may set the environment variables HOUNDIFY_CLIENT_ID and HOUNDIFY_CLIENT_KEY.

Using the SDK

To use the SDK, you must import the houndify package:

import (
    "github.com/soundhound/houndify-sdk-go"
)

Create a new client

client := houndify.Client{
    ClientID:  "YOUR_CLIENT_ID",
    ClientKey: "YOUR_CLIENT_KEY",
}

For a voice search, create a VoiceRequest and channel for partial transcripts. The audio to be streamed must already be the correct encoding that the server requires. See the Houndify Docs for details. There are example audio files to test with in test_audio.

req := houndify.VoiceRequest{
    AudioStream:       bytes.NewReader(audioDataByteArray),
    UserID:            "appUser123",
    RequestID:         "uniqueRequest456",
    RequestInfoFields: make(map[string]interface{}),
}

//listen for partial transcripts while audio is streaming
partialTranscripts := make(chan houndify.PartialTranscript)
go func() {
    for partial := range partialTranscripts {
        fmt.Println(partial.Message)
    }
}()

serverResponse, err := client.VoiceSearch(req, partialTranscripts)

For a text search, create a TextRequest

req := houndify.TextRequest{
    Query:             "what time is it in paris",
    UserID:            "appUser123",
    RequestID:         "uniqueRequest456",
    RequestInfoFields: make(map[string]interface{}),
}

serverResponse, err := client.TextSearch(req)

Conversation State

Houndified domains can use context to enable a conversational user interaction. For example, users can say "show me coffee shops near me", "which ones have wifi?", "sort by rating", "navigate to the first one". You can enable, disable, clear, set and get the client's conversation state with the following houndify.Client methods.

client.EnableConversationState()

client.DisableConversationState()

client.ClearConversationState()

currentState := client.GetConversationState()

client.SetConversationState(newState)

Contributing

There are multiple ways to contribute to the SDK.

If you found a bug or have a feature request, please open an Issue.

If you would like to make a code contribution, please sign the CLA, and make a Pull Request with your changes.

For account issues, security issues, or if you are unable to post publicly, please contact us directly.

License

The Houndify SDK for Go is distributed under the MIT License. See the LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].