Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

meinside/wit.ai-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wit.ai-go

Go library for wit.ai HTTP API

How to install

$ go get -u github.com/meinside/wit.ai-go

Usage

package main

import (
	"fmt"

	witai "github.com/meinside/wit.ai-go"
)

const (
	Token = "YOUR-WIT.AI-APP-SPECIFIC-TOKEN-HERE"
)

func main() {
	c := witai.NewClient(Token)

	//c.Verbose = false
	c.Verbose = true // for verbose messages

	// message
	if result, err := c.QueryMessage("how's the weather today?", nil, "", ""); err == nil {
		fmt.Printf("query message result: %+v\n", result)
	} else {
		fmt.Printf("%s\n", err)
	}

	// speech
	if result, err := c.QuerySpeechMp3("/some/where/test_voice.mp3", nil, "", "", 1); err == nil {
		fmt.Printf("query speech result: %+v\n", result)
	} else {
		fmt.Printf("%s\n", err)
	}
}

About

Go library for wit.ai HTTP API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages