lib/ios/PvPorcupine.xcframework/ios-arm64_armv7/PvPorcupine.framework/Headers/pv_porcupine.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_PORCUPINE_H
13 #define PV_PORCUPINE_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 
33 typedef struct pv_porcupine pv_porcupine_t;
34 
35 #if defined(__PV_NO_DYNAMIC_MEMORY__) && defined(__PV_NO_FILE_SYSTEM__)
36 
52  const char *access_key,
53  int32_t memory_size,
54  void *memory_buffer,
55  int32_t num_keywords,
56  const int32_t *keyword_model_sizes,
57  const void *const *keyword_models,
58  const float *sensitivities,
59  pv_porcupine_t **object);
60 
61 #elif !defined(__PV_NO_DYNAMIC_MEMORY__) && defined(__PV_NO_FILE_SYSTEM__)
62 
76  const char *access_key,
77  int32_t num_keywords,
78  const int32_t *keyword_model_sizes,
79  const void *const *keyword_models,
80  const float *sensitivities,
81  pv_porcupine_t **object);
82 
83 #elif !defined(__PV_NO_DYNAMIC_MEMORY__) && !defined(__PV_NO_FILE_SYSTEM__)
84 
99  const char *access_key,
100  const char *model_path,
101  int32_t num_keywords,
102  const char *const *keyword_paths,
103  const float *sensitivities,
104  pv_porcupine_t **object);
105 
106 #else
107 
108 #error
109 
110 #endif
111 
118 
130 PV_API pv_status_t pv_porcupine_process(pv_porcupine_t *object, const int16_t *pcm, int32_t *keyword_index);
131 
132 #if defined(__PV_NO_DYNAMIC_MEMORY__) && defined(__PV_NO_FILE_SYSTEM__)
133 
150  int32_t preliminary_memory_size,
151  void *preliminary_memory_buffer,
152  int32_t num_keywords,
153  const int32_t *keyword_model_sizes,
154  const void *const *keyword_models,
155  int32_t *min_memory_buffer_size);
156 
157 #endif
158 
164 PV_API const char *pv_porcupine_version(void);
165 
171 PV_API int32_t pv_porcupine_frame_length(void);
172 
173 #ifdef __cplusplus
174 }
175 
176 #endif
177 
178 #endif // PV_PORCUPINE_H
picovoice.h
pv_porcupine_delete
PV_API void pv_porcupine_delete(pv_porcupine_t *object)
pv_porcupine_process
PV_API pv_status_t pv_porcupine_process(pv_porcupine_t *object, const int16_t *pcm, int32_t *keyword_index)
pv_porcupine_init
PV_API pv_status_t pv_porcupine_init(const char *access_key, const char *model_path, int32_t num_keywords, const char *const *keyword_paths, const float *sensitivities, pv_porcupine_t **object)
pv_porcupine_frame_length
PV_API int32_t pv_porcupine_frame_length(void)
pv_status_t
pv_status_t
Definition: porcupine/include/picovoice.h:33
pv_porcupine_version
const PV_API char * pv_porcupine_version(void)
pv_porcupine_t
struct pv_porcupine pv_porcupine_t
Definition: include/pv_porcupine.h:33
PV_API
#define PV_API
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:18
pv_porcupine_get_min_memory_buffer_size
PV_API pv_status_t pv_porcupine_get_min_memory_buffer_size(int32_t preliminary_memory_size, void *preliminary_memory_buffer, int32_t num_keywords, const int32_t *keyword_model_sizes, const void *const *keyword_models, int32_t *min_memory_buffer_size)


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