From ceadef698eabb5ef47c36b60f968622043d602a2 Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 24 Nov 2023 10:16:52 -0800 Subject: [PATCH] final touches --- README.md | 18 +++++++++++++----- binding/android/README.md | 4 +++- binding/ios/README.md | 10 ++++++---- include/picovoice.h | 27 ++++++++++++++++++++++++++- 4 files changed, 48 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c61bc09..7fa0ffb 100644 --- a/README.md +++ b/README.md @@ -335,15 +335,23 @@ Replace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://con ## Releases -### v1.2.0 August 11th, 2022 +### v2.0.0 - November, 2022 -* added language support for French, German, Spanish, Japanese, Korean, Italian, and Portuguese -* improved testing infrastructure +- Improvements to error reporting +- Upgrades to authorization and authentication system +- Various bug fixes and improvements +- Web min support bumped to Node 16 +- iOS support bumped to iOS 13 + +### v1.2.0 - August 11th, 2022 + +- Added language support for French, German, Spanish, Japanese, Korean, Italian, and Portuguese. +- Improved testing infrastructure ### v1.1.0 May 12th, 2022 -* various bug fixes and improvements +- Various bug fixes and improvements ### v1.0.0 October 8th, 2021 -* Initial release. +- Initial release diff --git a/binding/android/README.md b/binding/android/README.md index 0563c21..c13a074 100644 --- a/binding/android/README.md +++ b/binding/android/README.md @@ -1,4 +1,6 @@ -# Octopus +# Octopus Binding for Android + +## Octopus Speech-to-Index Engine Made in Vancouver, Canada by [Picovoice](https://picovoice.ai) diff --git a/binding/ios/README.md b/binding/ios/README.md index ba023cf..4bd37fb 100644 --- a/binding/ios/README.md +++ b/binding/ios/README.md @@ -1,4 +1,6 @@ -# Octopus +# Octopus Binding for iOS + +## Octopus Speech-to-Index Engine Made in Vancouver, Canada by [Picovoice](https://picovoice.ai) @@ -12,7 +14,7 @@ hypothesis (e.g. homophones) ## Installation -The Octopus iOS binding is available via [Cocoapods](https://cocoapods.org/pods/Octopus-iOS). To import it into your iOS project, add the following line to your Podfile: +The Octopus iOS binding is available via [Cocoapods](https://cocoapods.org/pods/Octopus-iOS). To import it into your iOS project, add the following line to your Podfile: ```ruby pod 'Octopus-iOS' @@ -38,7 +40,7 @@ do { ``` Octopus consists of two steps: Indexing and Searching. -Indexing transforms audio data into searchable `OctopusMetadata` object. +Indexing transforms audio data into searchable `OctopusMetadata` object. Octopus indexing has two input options: raw PCM audio data, or an audio file. @@ -83,7 +85,7 @@ let matches = try octopus.search(metadata: metadata, phrases: phrases) ``` Matches are returned in a hashmap, where the key is the input phrase and the associated value is an array -of immutable `OctopusMatch` objects that represent any instances of the phrase that were found in the input audio. +of immutable `OctopusMatch` objects that represent any instances of the phrase that were found in the input audio. The start time and end time of the match are given in seconds, while the probability is a floating-point value between [0, 1]. ```swift diff --git a/include/picovoice.h b/include/picovoice.h index 3631832..7fb3b43 100644 --- a/include/picovoice.h +++ b/include/picovoice.h @@ -1,5 +1,5 @@ /* - Copyright 2018-2021 Picovoice Inc. + Copyright 2018-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. @@ -53,7 +53,32 @@ typedef enum { */ PV_API const char *pv_status_to_string(pv_status_t status); +/** + * If a function returns a failure (any pv_status_t other than PV_STATUS_SUCCESS), this function can be called + * to get a series of error messages related to the failure. This function can only be called only once per + * failure status on another function. The memory for `message_stack` must be freed using `pv_free_error_stack`. + * + * Regardless of the return status of this function, if `message_stack` is not `NULL`, then `message_stack` + * contains valid memory. However, a failure status on this function indicates that future error messages + * may not be reported. + * + * @param[out] message_stack Array of messages relating to the failure. Messages are NULL terminated strings. + * The array and messages must be freed using `pv_free_error_stack`. + * @param[out] message_stack_depth The number of messages in the `message_stack` array. + */ +PV_API pv_status_t pv_get_error_stack( + char ***message_stack, + int32_t *message_stack_depth); + +/** + * This function frees the memory used by error messages allocated by `pv_get_error_stack`. + * + * @param message_stack Array of messages relating to the failure, allocated from `pv_get_error_stack`. + */ +PV_API void pv_free_error_stack(char **message_stack); + #ifdef __cplusplus + } #endif