UniMRCP  1.7.0
mrcp_verifier_header.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 Arsen Chaloyan
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MRCP_VERIFIER_HEADER_H
18 #define MRCP_VERIFIER_HEADER_H
19 
20 /**
21  * @file mrcp_verifier_header.h
22  * @brief MRCP Verifier Header
23  */
24 
25 #include "mrcp_types.h"
26 #include "mrcp_header_accessor.h"
27 
29 
30 /** MRCP verifier header fields */
31 typedef enum {
32  VERIFIER_HEADER_REPOSITORY_URI,
33  VERIFIER_HEADER_VOICEPRINT_IDENTIFIER,
34  VERIFIER_HEADER_VERIFICATION_MODE,
35  VERIFIER_HEADER_ADAPT_MODEL,
36  VERIFIER_HEADER_ABORT_MODEL,
37  VERIFIER_HEADER_MIN_VERIFICATION_SCORE,
38  VERIFIER_HEADER_NUM_MIN_VERIFICATION_PHRASES,
39  VERIFIER_HEADER_NUM_MAX_VERIFICATION_PHRASES,
40  VERIFIER_HEADER_NO_INPUT_TIMEOUT,
41  VERIFIER_HEADER_SAVE_WAVEFORM,
42  VERIFIER_HEADER_MEDIA_TYPE,
43  VERIFIER_HEADER_WAVEFORM_URI,
44  VERIFIER_HEADER_VOICEPRINT_EXISTS,
45  VERIFIER_HEADER_VER_BUFFER_UTTERANCE,
46  VERIFIER_HEADER_INPUT_WAVEFORM_URI,
47  VERIFIER_HEADER_COMPLETION_CAUSE,
48  VERIFIER_HEADER_COMPLETION_REASON,
49  VERIFIER_HEADER_SPEECH_COMPLETE_TIMEOUT,
50  VERIFIER_HEADER_NEW_AUDIO_CHANNEL,
51  VERIFIER_HEADER_ABORT_VERIFICATION,
52  VERIFIER_HEADER_START_INPUT_TIMERS,
53 
54  VERIFIER_HEADER_COUNT
56 
57 
58 /** MRCP verifier completion-cause */
59 typedef enum {
60  VERIFIER_COMPLETION_CAUSE_SUCCESS = 0,
61  VERIFIER_COMPLETION_CAUSE_ERROR = 1,
62  VERIFIER_COMPLETION_CAUSE_NO_INPUT_TIMEOUT = 2,
63  VERIFIER_COMPLETION_CAUSE_TOO_MUCH_SPEECH_TIMEOUT = 3,
64  VERIFIER_COMPLETION_CAUSE_SPEECH_TOO_EARLY = 4,
65  VERIFIER_COMPLETION_CAUSE_BUFFER_EMPTY = 5,
66  VERIFIER_COMPLETION_CAUSE_OUT_OF_SEQUENCE = 6,
67  VERIFIER_COMPLETION_CAUSE_REPOSITORY_URI_FAILURE = 7,
68  VERIFIER_COMPLETION_CAUSE_REPOSITORY_URI_MISSING = 8,
69  VERIFIER_COMPLETION_CAUSE_VOICEPRINT_ID_MISSING = 9,
70  VERIFIER_COMPLETION_CAUSE_VOICEPRINT_ID_NOT_EXIST = 10,
71  VERIFIER_COMPLETION_CAUSE_SPEECH_NOT_USABLE = 11,
72 
73  VERIFIER_COMPLETION_CAUSE_COUNT = 12,
74  VERIFIER_COMPLETION_CAUSE_UNKNOWN = VERIFIER_COMPLETION_CAUSE_COUNT
76 
77 
78 
79 /** MRCP verifier-header declaration */
81 
82 /** MRCP verifier-header */
84  /** Specifies the voiceprint repository to be used or referenced during
85  speaker verification or identification operations */
87  /** Specifies the claimed identity for verification applications */
89  /** Specifies the mode of the verification resource */
91  /** Indicates the desired behavior of the verification resource
92  after a successful verification operation */
94  /** Indicates the desired behavior of the verification resource
95  upon session termination */
97  /** Determines the minimum verification score for which a verification
98  decision of "accepted" may be declared by the server */
100  /** Specifies the minimum number of valid utterances
101  before a positive decision is given for verification */
103  /** Specifies the number of valid utterances required
104  before a decision is forced for verification */
106  /** Sets the length of time from the start of the verification timers
107  (see START-INPUT-TIMERS) until the declaration of a no-input event
108  in the VERIFICATION-COMPLETE server event message */
109  apr_size_t no_input_timeout;
110  /** Allows the client to request the verification resource to save
111  the audio stream that was used for verification/identification */
113  /** Tells the server resource the Media Type of the captured audio or video
114  such as the one captured and returned by the Waveform-URI header field */
116  /** If the Save-Waveform header field is set to true, the verification resource
117  MUST attempt to record the incoming audio stream of the verification into
118  a file and provide a URI for the client to access it */
120  /** Shows the status of the voiceprint specified
121  in the QUERY-VOICEPRINT method */
123  /** Indicates that this utterance could be
124  later considered for Speaker Verification */
126  /** Specifies stored audio content that the client requests the server
127  to fetch and process according to the current verification mode,
128  either to train the voiceprint or verify a claimed identity */
130  /** Indicates the cause of VERIFY or VERIFY-FROM-BUFFER method completion */
132  /** MAY be specified in a VERIFICATION-COMPLETE event
133  coming from the verifier resource to the client */
135  /** Specifies the length of silence required following user
136  speech before the speech verifier finalizes a result */
138  /** MAY be specified in a VERIFIER request and allows the
139  client to tell the server that, from this point on, further input
140  audio comes from a different audio source */
142  /** MUST be sent in a STOP request to indicate
143  whether or not to abort a VERIFY method in progress */
145  /** MAY be sent as part of a VERIFY request. A value of false
146  tells the verification resource to start the VERIFY operation,
147  but not to start the no-input timer yet */
149 };
150 
151 
152 /** Get verifier header vtable */
154 
155 /** Get verifier completion cause string */
157 
159 
160 #endif /* MRCP_VERIFIER_HEADER_H */
#define MRCP_DECLARE(type)
Definition: mrcp.h:40
apt_bool_t voiceprint_exists
Definition: mrcp_verifier_header.h:122
mrcp_verifier_completion_cause_e
Definition: mrcp_verifier_header.h:59
apt_bool_t abort_verification
Definition: mrcp_verifier_header.h:144
#define APT_END_EXTERN_C
Definition: apt.h:38
apt_bool_t new_audio_channel
Definition: mrcp_verifier_header.h:141
apr_size_t num_max_verification_phrases
Definition: mrcp_verifier_header.h:105
int apt_bool_t
Definition: apt.h:57
Definition: mrcp_header_accessor.h:37
apt_bool_t abort_model
Definition: mrcp_verifier_header.h:96
mrcp_version_e
Definition: mrcp_types.h:30
mrcp_verifier_header_id
Definition: mrcp_verifier_header.h:31
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
apt_bool_t adapt_model
Definition: mrcp_verifier_header.h:93
apt_str_t media_type
Definition: mrcp_verifier_header.h:115
Basic MRCP Types.
const mrcp_header_vtable_t * mrcp_verifier_header_vtable_get(mrcp_version_e version)
Definition: mrcp_verifier_header.h:83
apt_str_t completion_reason
Definition: mrcp_verifier_header.h:134
apt_bool_t ver_buffer_utterance
Definition: mrcp_verifier_header.h:125
apr_size_t num_min_verification_phrases
Definition: mrcp_verifier_header.h:102
mrcp_verifier_completion_cause_e completion_cause
Definition: mrcp_verifier_header.h:131
Definition: apt_string.h:36
float min_verification_score
Definition: mrcp_verifier_header.h:99
const apt_str_t * mrcp_verifier_completion_cause_get(mrcp_verifier_completion_cause_e completion_cause, mrcp_version_e version)
apr_size_t speech_complete_timeout
Definition: mrcp_verifier_header.h:137
apt_bool_t start_input_timers
Definition: mrcp_verifier_header.h:148
apt_str_t repository_uri
Definition: mrcp_verifier_header.h:86
Abstract MRCP Header Accessor.
apr_size_t no_input_timeout
Definition: mrcp_verifier_header.h:109
apt_str_t verification_mode
Definition: mrcp_verifier_header.h:90
apt_bool_t save_waveform
Definition: mrcp_verifier_header.h:112
apt_str_t voiceprint_identifier
Definition: mrcp_verifier_header.h:88
apt_str_t waveform_uri
Definition: mrcp_verifier_header.h:119
apt_str_t input_waveform_uri
Definition: mrcp_verifier_header.h:129