voiceit2

package module
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PlatformId string = "39"
View Source
const PlatformVersion string = "v2.5.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) ([]byte, error)

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) ([]byte, error)

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) ([]byte, error)

CheckUserExists takes the userId generated during a createUser and returns an 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) ([]byte, 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) ([]byte, error)

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) ([]byte, error)

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) CreateManagedSubAccount

func (vi VoiceIt2) CreateManagedSubAccount(params structs.CreateSubAccountRequest) ([]byte, error)

CreateManagedSubAccount creates a managed sub-account.

func (VoiceIt2) CreateUnmanagedSubAccount

func (vi VoiceIt2) CreateUnmanagedSubAccount(params structs.CreateSubAccountRequest) ([]byte, error)

CreateUnmanagedSubAccount creates an unmanaged sub-account.

func (VoiceIt2) CreateUser

func (vi VoiceIt2) CreateUser() ([]byte, error)

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) ([]byte, error)

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) ([]byte, 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) ([]byte, 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 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) ([]byte, 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) ([]byte, error)

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) ([]byte, error)

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) DeleteGroup

func (vi VoiceIt2) DeleteGroup(groupId string) ([]byte, error)

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) DeleteSubAccount

func (vi VoiceIt2) DeleteSubAccount(subAccountAPIKey string) ([]byte, error)

DeleteSubAccount takes a subAccountAPIKey (string).

func (VoiceIt2) DeleteUser

func (vi VoiceIt2) DeleteUser(userId string) ([]byte, error)

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) ExpireUserTokens

func (vi VoiceIt2) ExpireUserTokens(userId string) ([]byte, error)

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) ([]byte, 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) ([]byte, error)

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) ([]byte, 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) ([]byte, error)

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) ([]byte, error)

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() ([]byte, error)

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() ([]byte, error)

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) ([]byte, error)

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) ([]byte, error)

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) ([]byte, error)

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) ([]byte, error)

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) ([]byte, error)

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

func (VoiceIt2) RegenerateSubAccountAPIToken

func (vi VoiceIt2) RegenerateSubAccountAPIToken(subAccountAPIKey string) ([]byte, error)

RegenerateSubAccountAPIToken takes a subAccountAPIKey (string).

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) ([]byte, error)

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) SwitchSubAccountType

func (vi VoiceIt2) SwitchSubAccountType(subAccountAPIKey string) ([]byte, error)

SwitchSubAccountType takes a subAccountAPIKey (string) (

func (VoiceIt2) VideoIdentification

func (vi VoiceIt2) VideoIdentification(groupId string, contentLanguage string, phrase string, filePath string) ([]byte, 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) ([]byte, error)

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) ([]byte, 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) ([]byte, error)

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) ([]byte, 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) ([]byte, error)

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) ([]byte, 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) ([]byte, error)

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