Skip to content

kkdai/oxford-emotion

Repository files navigation

Project Oxford Emotion API for Golang

GitHub license GoDoc Build Status

This package is Project Oxford Face API in Golang

What is Project Oxford Emotion API

Project Oxford is a web services from Microsoft. It contains following services. (refer from this page.)

Installation

go get github.com/kkdai/oxford-emotion

How to use it

Sign-up for Microsoft Translator API (see here for more detail) and get your developer credentials. Use the client ID and secret to instantiate a translator as shown below.

package main

import (
	"fmt"
	"os"

	. "github.com/kkdai/oxford-face"
)

func main() {
	key := os.Getenv("MSFT_KEY")
	if key == "" {
		fmt.Println("Please export your key to environment first, `export MSFT_KEY=12234`")
		return
	}
	f := NewFace(key)

	//Detect
	ret, err := f.DetectFile(nil, "./1.jpg")
	fmt.Println("ret:", ret, " err=", err)
}

Contribute

Please open up an issue on GitHub before you put a lot efforts on pull request. The code submitting to PR must be filtered with gofmt

Inspired

Project52

It is one of my project 52.

License

This package is licensed under MIT license. See LICENSE for details.

About

Project Oxford Emotion API for Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages