voiceit2

package module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 9 Imported by: 0

README

VoiceIt2-Go travis godoc Go Report Card

A Go wrapper for VoiceIt's API 2.0 featuring Voice + Face Verification and Identification.

Getting Started

Sign up for a free Developer Account at VoiceIt.io. Visit the settings tab to view your API Key and Token.

API calls

You can visit our HTTP API 2.0 Documentation for detailed information on each API call.

Support

Contact us with any questions at support@voiceit.io

License

VoiceIt2-Go is available under the MIT license. See the LICENSE file for more info.

Documentation

Index

Constants

View Source
const PlatformVersion string = "v1.2.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type VoiceIt2

type VoiceIt2 struct {
	ApiKey          string
	ApiToken        string
	BaseUrl         string
	NotificationUrl string
}

func NewClient

func NewClient(key string, tok string) *VoiceIt2

NewClient returns a new VoiceIt2 client

func (*VoiceIt2) AddNotificationUrl

func (vi *VoiceIt2) AddNotificationUrl(notificationUrl string)

AddNotificationUrl adds a notification URL field in the VoiceIt2 object. If one is already specified, it will be overwritten For more details, see https://api.voiceit.io/#webhook-notification

func (*VoiceIt2) AddUserToGroup

func (vi *VoiceIt2) AddUserToGroup(groupId string, userId string) string

AddUserToGroup takes the groupId generated during a createGroup and the userId generated during createUser and adds the user to the group For more details see https://api.voiceit.io/#add-user-to-group

func (*VoiceIt2) CheckGroupExists

func (vi *VoiceIt2) CheckGroupExists(groupId string) string

CheckGroupExists takes the groupId generated during a createGroup and returns whether the group exists for the given groupId For more details see https://api.voiceit.io/#check-if-group-exists

func (*VoiceIt2) CheckUserExists

func (vi *VoiceIt2) CheckUserExists(userId string) string

CheckUserExists takes the userId generated during a createUser and returns a JSON object which contains the boolean "exists" which shows whether a given user exists For more details see https://api.voiceit.io/#check-if-a-specific-user-exists

func (*VoiceIt2) CreateFaceEnrollment

func (vi *VoiceIt2) CreateFaceEnrollment(userId string, filePath string) (string, error)

CreateFaceEnrollment takes the userId generated during a createUser and absolute file path for a video recording to create a face enrollment for the user For more details see https://api.voiceit.io/#create-face-enrollment

func (*VoiceIt2) CreateFaceEnrollmentByUrl

func (vi *VoiceIt2) CreateFaceEnrollmentByUrl(userId string, fileUrl string) string

CreateFaceEnrollmentByUrl takes the userId generated during a createUser and a fully qualified URL to a video recording to verify the user's face For more details see https://api.voiceit.io/#create-face-enrollment-by-url

func (*VoiceIt2) CreateGroup

func (vi *VoiceIt2) CreateGroup(description string) string

CreateGroup creates a new group profile and returns a unique groupId that is used for all future calls related to the group For more details see https://api.voiceit.io/#create-a-group

func (*VoiceIt2) CreateUser

func (vi *VoiceIt2) CreateUser() string

CreateUser creates a new user profile and returns a unique userId that is used for all future calls related to the user profile For more details see https://api.voiceit.io/#create-a-user

func (*VoiceIt2) CreateUserToken

func (vi *VoiceIt2) CreateUserToken(userId string, timeout time.Duration) string

CreateUserToken takes the userId (string) and a timeout (time.Duration). The returned user token can be used to construct a new VoiceIt2 instance which has user level rights for the given user. The timeout controls the expiration of the user token. For more details see https://api.voiceit.io/?go#user-token-generation

func (*VoiceIt2) CreateVideoEnrollment

func (vi *VoiceIt2) CreateVideoEnrollment(userId string, contentLanguage string, phrase string, filePath string) (string, error)

CreateVideoEnrollment takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and absolute file path for a video recording to create a video enrollment for the user For more details see https://api.voiceit.io/#create-video-enrollment

func (*VoiceIt2) CreateVideoEnrollmentByUrl

func (vi *VoiceIt2) CreateVideoEnrollmentByUrl(userId string, contentLanguage string, phrase string, fileUrl string) string

CreateVideoEnrollment takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and a fully qualified URL to a video recording to create a video enrollment for the user For more details see https://api.voiceit.io/#create-video-enrollment-by-url

func (*VoiceIt2) CreateVoiceEnrollment

func (vi *VoiceIt2) CreateVoiceEnrollment(userId string, contentLanguage string, phrase string, filePath string) (string, error)

CreateVoiceEnrollment takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and absolute file path for a audio recording to create a voice enrollment for the user For more details see https://api.voiceit.io/#create-voice-enrollment

func (*VoiceIt2) CreateVoiceEnrollmentByUrl

func (vi *VoiceIt2) CreateVoiceEnrollmentByUrl(userId string, contentLanguage string, phrase string, fileUrl string) string

CreateVoiceEnrollmentByUrl takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and a fully qualified URL to a audio recording to create a voice enrollment for the user For more details see https://api.voiceit.io/#create-voice-enrollment-by-url

func (*VoiceIt2) DeleteAllEnrollments

func (vi *VoiceIt2) DeleteAllEnrollments(userId string) string

DeleteAllEnrollments takes the userId generated during a createUser and deletes all video/voice enrollments for the user For more details see https://api.voiceit.io/#delete-all-enrollments-for-user

func (*VoiceIt2) DeleteAllFaceEnrollments

func (vi *VoiceIt2) DeleteAllFaceEnrollments(userId string) string

DeleteAllFaceEnrollments takes the userId generated during a createUser For more details see https://api.voiceit.io/#delete-all-face-enrollments

func (*VoiceIt2) DeleteAllVideoEnrollments

func (vi *VoiceIt2) DeleteAllVideoEnrollments(userId string) string

DeleteAllVideoEnrollments takes the userId generated during a createUser For more details see https://api.voiceit.io/#delete-all-video-enrollments

func (*VoiceIt2) DeleteAllVoiceEnrollments

func (vi *VoiceIt2) DeleteAllVoiceEnrollments(userId string) string

DeleteAllVoiceEnrollments takes the userId generated during a createUser For more details https://api.voiceit.io/#delete-all-voice-enrollments

func (*VoiceIt2) DeleteFaceEnrollment

func (vi *VoiceIt2) DeleteFaceEnrollment(userId string, faceEnrollmentId int) string

DeleteFaceEnrollment takes the userId generated during a createUser and a faceEnrollmentId returned during a faceEnrollment and deletes the specific faceEnrollment for the user For more details see https://api.voiceit.io/#delete-face-enrollment

func (*VoiceIt2) DeleteGroup

func (vi *VoiceIt2) DeleteGroup(groupId string) string

DeleteGroup takes the groupId generated during a createGroup and deletes the group profile disassociates all users associated with it For more details see https://api.voiceit.io/#delete-a-specific-group

func (*VoiceIt2) DeleteUser

func (vi *VoiceIt2) DeleteUser(userId string) string

DeleteUser takes the userId generated during a createUser and deletes the user profile and all associated face and voice enrollments For more details see https://api.voiceit.io/#delete-a-specific-user

func (*VoiceIt2) DeleteVideoEnrollment

func (vi *VoiceIt2) DeleteVideoEnrollment(userId string, id int) string

DeleteVideoEnrollment takes the userId generated during a createUser and an enrollmentId returned during a voiceEnrollment/videoEnrollment and deletes the voice/video enrollment for the user For more details see https://api.voiceit.io/#delete-video-enrollment

func (*VoiceIt2) DeleteVoiceEnrollment

func (vi *VoiceIt2) DeleteVoiceEnrollment(userId string, id int) string

DeleteVoiceEnrollment takes the userId generated during a createUser and an enrollmentId returned during a voiceEnrollment/videoEnrollment and deletes the voice enrollment for the user For more details see https://api.voiceit.io/#delete-voice-enrollment

func (*VoiceIt2) ExpireUserTokens added in v1.2.0

func (vi *VoiceIt2) ExpireUserTokens(userId string) string

ExpireUserTokens takes a userId (string). For more details see https://api.voiceit.io/?go#user-token-expiration

func (*VoiceIt2) FaceIdentification

func (vi *VoiceIt2) FaceIdentification(groupId string, filePath string) (string, error)

FaceIdentification takes the groupId generated during a createGroup, and absolute file path for a face recording to idetify the user's face amongst others in the group For more details see https://api.voiceit.io/#identify-a-user-s-face

func (*VoiceIt2) FaceIdentificationByUrl

func (vi *VoiceIt2) FaceIdentificationByUrl(groupId string, fileUrl string) string

FaceIdentificationByUrl takes the groupId generated during a createGroup, and a fully qualified URL to a face recording to idetify the user's face amongst others in the group For more details see https://api.voiceit.io/#identify-a-user-s-face-by-url

func (*VoiceIt2) FaceVerification

func (vi *VoiceIt2) FaceVerification(userId string, filePath string) (string, error)

FaceVerification takes the userId generated during a createUser and a absolute file path for a video recording to verify the user's face For more details see https://api.voiceit.io/#verify-a-user-s-face

func (*VoiceIt2) FaceVerificationByUrl

func (vi *VoiceIt2) FaceVerificationByUrl(userId string, fileUrl string) string

FaceVerificationByUrl takes the userId generated during a createUser and a fully qualified URL to a video recording to verify the user's face For more details see https://api.voiceit.io/#verify-a-user-s-face-by-url

func (*VoiceIt2) GetAllFaceEnrollments

func (vi *VoiceIt2) GetAllFaceEnrollments(userId string) string

GetAllFaceEnrollments takes the userId generated during a createUser and returns a list of all face enrollments for the user For more details see https://api.voiceit.io/#get-face-enrollments

func (*VoiceIt2) GetAllGroups

func (vi *VoiceIt2) GetAllGroups() string

GetAllGroups returns a list of all groups associated with the API Key For more details see https://api.voiceit.io/#get-all-groups

func (*VoiceIt2) GetAllUsers

func (vi *VoiceIt2) GetAllUsers() string

GetAllUsers returns a list of all users associated with the API Key For more details see https://api.voiceit.io/#get-all-users

func (*VoiceIt2) GetAllVideoEnrollments

func (vi *VoiceIt2) GetAllVideoEnrollments(userId string) string

GetAllVideoEnrollments takes the userId generated during a createUser and returns a list of all video enrollments for the user For more details see https://api.voiceit.io/#get-video-enrollments

func (*VoiceIt2) GetAllVoiceEnrollments

func (vi *VoiceIt2) GetAllVoiceEnrollments(userId string) string

GetAllVoiceEnrollments takes the userId generated during a createUser and returns a list of all voice enrollments for the user For more details see https://api.voiceit.io/#get-voice-enrollments

func (*VoiceIt2) GetGroup

func (vi *VoiceIt2) GetGroup(groupId string) string

GetGroup takes the groupId generated during a createGroup and returns the group along with a list of associated users in the group For more details see https://api.voiceit.io/#get-a-specific-group

func (*VoiceIt2) GetGroupsForUser

func (vi *VoiceIt2) GetGroupsForUser(userId string) string

GetGroupsForUser takes the userId generated during a createUser and returns a list of all groups that the user belongs to For more details see https://api.voiceit.io/#get-groups-for-user

func (*VoiceIt2) GetPhrases

func (vi *VoiceIt2) GetPhrases(contentLanguage string) string

GetPhrases takes the contentLanguage For more details see https://api.voiceit.io/#get-phrases

func (*VoiceIt2) RemoveNotificationUrl

func (vi *VoiceIt2) RemoveNotificationUrl()

RemoveNotificationUrl removes the notification URL field from the VoiceIt2 struct

func (*VoiceIt2) RemoveUserFromGroup

func (vi *VoiceIt2) RemoveUserFromGroup(groupId string, userId string) string

RemoveUserFromGroup takes the groupId generated during a createGroup and the userId generated during createUser and removes the user from the group For more details see https://api.voiceit.io/#remove-user-from-group

func (*VoiceIt2) VideoIdentification

func (vi *VoiceIt2) VideoIdentification(groupId string, contentLanguage string, phrase string, filePath string) (string, error)

VideoIdentification takes the groupId generated during a createGroup, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and absolute file path for a video recording to idetify the user's face and voice amongst others in the group For more details see https://api.voiceit.io/#identify-a-user-s-voice-amp-face

func (*VoiceIt2) VideoIdentificationByUrl

func (vi *VoiceIt2) VideoIdentificationByUrl(groupId string, contentLanguage string, phrase string, fileUrl string) string

VideoIdentificationByUrl takes the groupId generated during a createGroup, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and a fully qualified URL to a video recording to idetify the user's face and voice amongst others in the group For more details see https://api.voiceit.io/#identify-a-user-s-voice-amp-face-by-url

func (*VoiceIt2) VideoVerification

func (vi *VoiceIt2) VideoVerification(userId string, contentLanguage string, phrase string, filePath string) (string, error)

VideoVerification takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and absolute file path for a video recording to verify the user's face and voice For more details see https://api.voiceit.io/#video-verification

func (*VoiceIt2) VideoVerificationByUrl

func (vi *VoiceIt2) VideoVerificationByUrl(userId string, contentLanguage string, phrase string, fileUrl string) string

VideoVerificationByUrl takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and a fully qualified URL to a video recording to verify the user's face and voice For more details see https://api.voiceit.io/#video-verification-by-url

func (*VoiceIt2) VoiceIdentification

func (vi *VoiceIt2) VoiceIdentification(groupId string, contentLanguage string, phrase string, filePath string) (string, error)

VoiceIdentification takes the groupId generated during a createGroup, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and absolute file path for a audio recording to idetify the user's voice amongst others in the group For more details see https://api.voiceit.io/#identify-a-user-s-voice

func (*VoiceIt2) VoiceIdentificationByUrl

func (vi *VoiceIt2) VoiceIdentificationByUrl(groupId string, contentLanguage string, phrase string, fileUrl string) string

VoiceIdentificationByUrl takes the groupId generated during a createGroup, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and a fully qualified URL to a audio recording to idetify the user's voice amongst others in the group For more details see https://api.voiceit.io/#identify-a-user-s-voice-by-url

func (*VoiceIt2) VoiceVerification

func (vi *VoiceIt2) VoiceVerification(userId string, contentLanguage string, phrase string, filePath string) (string, error)

VoiceVerification takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and absolute file path for a audio recording to verify the user's voice For more details see https://api.voiceit.io/#verify-a-user-s-voice

func (*VoiceIt2) VoiceVerificationByUrl

func (vi *VoiceIt2) VoiceVerificationByUrl(userId string, contentLanguage string, phrase string, fileUrl string) string

VoiceVerificationByUrl takes the userId generated during a createUser, the contentLanguage(https://api.voiceit.io/#content-languages) for the phrase, the text of a valid phrase for the developer account, and a fully qualified URL to a audio recording to verify the user's voice For more details see https://api.voiceit.io/#verify-a-user-s-voice-by-url

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL