lib/ios/PvRhino.xcframework/ios-arm64_i386_x86_64-simulator/PvRhino.framework/Headers/pv_rhino.h
Go to the documentation of this file.
1 /*
2  Copyright 2018-2021 Picovoice Inc.
3 
4  You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
5  file accompanying this source.
6 
7  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9  specific language governing permissions and limitations under the License.
10 */
11 
12 #ifndef PV_RHINO_H
13 #define PV_RHINO_H
14 
15 #include <stdbool.h>
16 #include <stdint.h>
17 
18 #include "picovoice.h"
19 
20 #ifdef __cplusplus
21 
22 extern "C" {
23 
24 #endif
25 
34 typedef struct pv_rhino pv_rhino_t;
35 
36 #if defined(__PV_NO_DYNAMIC_MEMORY__) && defined(__PV_NO_FILE_SYSTEM__)
37 
54  const char *access_key,
55  void *memory_buffer,
56  int32_t memory_size,
57  const void *context,
58  int32_t context_size,
59  float sensitivity,
60  bool require_endpoint,
61  pv_rhino_t **object);
62 
63 #elif !defined(__PV_NO_DYNAMIC_MEMORY__) && defined(__PV_NO_FILE_SYSTEM__)
64 
78  const char *access_key,
79  const void *context,
80  int32_t context_size,
81  float sensitivity,
82  bool require_endpoint,
83  pv_rhino_t **object);
84 
85 #elif !defined(__PV_NO_DYNAMIC_MEMORY__) && !defined(__PV_NO_FILE_SYSTEM__)
86 
102  const char *access_key,
103  const char *model_path,
104  const char *context_path,
105  float sensitivity,
106  bool require_endpoint,
107  pv_rhino_t **object);
108 
109 #else
110 
111 #error
112 
113 #endif
114 
120 PV_API void pv_rhino_delete(pv_rhino_t *object);
121 
133 PV_API pv_status_t pv_rhino_process(pv_rhino_t *object, const int16_t *pcm, bool *is_finalized);
134 
144 PV_API pv_status_t pv_rhino_is_understood(const pv_rhino_t *object, bool *is_understood);
145 
161  const pv_rhino_t *object,
162  const char **intent,
163  int32_t *num_slots,
164  const char ***slots,
165  const char ***values);
166 
177 PV_API pv_status_t pv_rhino_free_slots_and_values(const pv_rhino_t *object, const char **slots, const char **values);
178 
187 
195 PV_API pv_status_t pv_rhino_context_info(const pv_rhino_t *object, const char **context_info);
196 
197 #if defined(__PV_NO_DYNAMIC_MEMORY__) && defined(__PV_NO_FILE_SYSTEM__)
198 
213 PV_API pv_status_t pv_rhino_get_min_memory_buffer_size(
214  void *preliminary_memory_buffer,
215  int32_t preliminary_memory_size,
216  const void *context_model,
217  int32_t context_model_size,
218  int32_t *min_memory_buffer_size);
219 
220 #endif
221 
227 PV_API const char *pv_rhino_version(void);
228 
234 PV_API int32_t pv_rhino_frame_length(void);
235 
236 #ifdef __cplusplus
237 }
238 
239 #endif
240 
241 #endif // PV_RHINO_H
pv_rhino_free_slots_and_values
PV_API pv_status_t pv_rhino_free_slots_and_values(const pv_rhino_t *object, const char **slots, const char **values)
context
ma_context context
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/tests/test_deviceio/ma_test_deviceio.c:56
pv_rhino_delete
PV_API void pv_rhino_delete(pv_rhino_t *object)
pv_rhino_process
PV_API pv_status_t pv_rhino_process(pv_rhino_t *object, const int16_t *pcm, bool *is_finalized)
pv_rhino_is_understood
PV_API pv_status_t pv_rhino_is_understood(const pv_rhino_t *object, bool *is_understood)
pv_rhino_get_intent
PV_API pv_status_t pv_rhino_get_intent(const pv_rhino_t *object, const char **intent, int32_t *num_slots, const char ***slots, const char ***values)
picovoice.h
pv_rhino_version
const PV_API char * pv_rhino_version(void)
pv_status_t
pv_status_t
Definition: porcupine/include/picovoice.h:33
pv_rhino_frame_length
PV_API int32_t pv_rhino_frame_length(void)
PV_API
#define PV_API
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:18
pv_rhino_reset
PV_API pv_status_t pv_rhino_reset(pv_rhino_t *object)
pv_rhino_t
struct pv_rhino pv_rhino_t
Definition: include/pv_rhino.h:34
pv_rhino_init
PV_API pv_status_t pv_rhino_init(const char *access_key, const char *model_path, const char *context_path, float sensitivity, bool require_endpoint, pv_rhino_t **object)
pv_rhino_context_info
PV_API pv_status_t pv_rhino_context_info(const pv_rhino_t *object, const char **context_info)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:50