Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1 #389

Merged
merged 33 commits into from
Dec 11, 2024
Merged

v2.1 #389

Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0c259b8
add v2.1 libs
ben-w-conrad Nov 28, 2024
e246a5e
update test data
ben-w-conrad Nov 29, 2024
1621887
v2.1 Python (#360)
ben-w-conrad Nov 29, 2024
2c53a7a
v2.1 dotnet (#361)
ksyeo1010 Dec 3, 2024
c489285
v2.1 java (#363)
ksyeo1010 Dec 3, 2024
47a5ed8
v2.1 web (#365)
ksyeo1010 Dec 3, 2024
51eddc7
v2.1 Rust (#367)
ErisMik Dec 4, 2024
cea11df
update python readme (#368)
ben-w-conrad Dec 4, 2024
b8b3e58
v2.1 go (#362)
ksyeo1010 Dec 4, 2024
fa5b3df
v2.1 react (#366)
ksyeo1010 Dec 4, 2024
2e6c2d4
v2.1 Android (#369)
ErisMik Dec 5, 2024
ef53947
v2.1 libs
ksyeo1010 Dec 5, 2024
5255e8d
V2.1 ios (#371)
ErisMik Dec 6, 2024
2d82a1c
v2.1 node (#364)
ksyeo1010 Dec 6, 2024
6a70431
V2.1 flutter (#372)
ErisMik Dec 9, 2024
319fa82
v2.1 React Native (#373)
ErisMik Dec 9, 2024
a2732c1
release
ben-w-conrad Dec 9, 2024
ce75cd4
bump demo requirements
ben-w-conrad Dec 9, 2024
08f2f4e
v2.1 Flutter release (#386)
ErisMik Dec 10, 2024
ba2db28
v2.1 ios release (#382)
ErisMik Dec 10, 2024
48d7d1b
v2.1 react native release (#387)
ErisMik Dec 10, 2024
cca3a0a
v2.1 web release (#384)
ksyeo1010 Dec 10, 2024
1f45169
v2.1 react release (#385)
ksyeo1010 Dec 10, 2024
c32abfd
v2.1 Android Release 2 (#378)
ErisMik Dec 10, 2024
9c2e811
release and update dotnet (#379)
ksyeo1010 Dec 10, 2024
2faaeb2
v2.1 java release (#381)
ksyeo1010 Dec 10, 2024
11ff0de
v2.1 node release (#383)
ksyeo1010 Dec 10, 2024
f13b164
Merge pull request #377 from Picovoice/v2.1-python-release
ben-w-conrad Dec 10, 2024
f921d65
v2.1 rust release (#388)
ErisMik Dec 10, 2024
b51fdc9
v2.1 go release (#380)
ksyeo1010 Dec 10, 2024
6a022f1
v2.1 Update ES and IT Models (#374)
ben-w-conrad Dec 10, 2024
633a67a
v2.1 release notes
ErisMik Dec 10, 2024
b12701d
v2.1 language support readme
ErisMik Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
v2.1 React Native (#373)
* v2.1 - RN

* v2.1 RN - Tests

* v2.1 RN - Demos

* v2.1 RN - Global yarn?

* v2.1 RN - Package source updates

* v2.1 RN - Missing maven repo spec

* v2.1 RN - Demo podfile update

* v2.1 RN - Update Podfile source

* v2.1 RN - Podfile wipe
ErisMik authored Dec 9, 2024
commit 319fa82defec0ad09b1ff1ce18e3afdc0c3e777e
22 changes: 20 additions & 2 deletions .github/workflows/react-native-demos.yml
Original file line number Diff line number Diff line change
@@ -36,7 +36,16 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn
run: npm install -g yarn

# ************ REMOVE AFTER RELEASE *****************
- name: Build and package binding
working-directory: binding/react-native
run: yarn && yarn pkg

- name: Add to demo
run: yarn add ../../binding/react-native/pkg/picovoice-cheetah-react-native-2.1.0.tgz
# ***************************************************

- name: Install dependencies
run: yarn android-install
@@ -64,7 +73,16 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn
run: npm install -g yarn

# ************ REMOVE AFTER RELEASE *****************
- name: Build and package binding
working-directory: binding/react-native
run: yarn && yarn pkg

- name: Add to demo
run: yarn add ../../binding/react-native/pkg/picovoice-cheetah-react-native-2.1.0.tgz
# ***************************************************

- name: Install dependencies
run: yarn ios-install
4 changes: 2 additions & 2 deletions binding/android/CheetahTestApp/build.gradle
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ buildscript {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1353/'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1355/'
}
}
dependencies {
@@ -20,7 +20,7 @@ allprojects {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1353/'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1355/'
}
}
}
2 changes: 1 addition & 1 deletion binding/ios/Cheetah-iOS.podspec
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ Pod::Spec.new do |s|
DESC
s.homepage = 'https://github.com/Picovoice/cheetah/tree/master/binding/ios'
s.author = { 'Picovoice' => 'hello@picovoice.ai' }
s.source = { :git => "https://github.com/Picovoice/cheetah.git", :branch => "v2.1-flutter" }
s.source = { :git => "https://github.com/Picovoice/cheetah.git", :branch => "v2.1-react-native" }
s.ios.deployment_target = '13.0'
s.swift_version = '5.0'
s.vendored_frameworks = 'lib/ios/PvCheetah.xcframework'
5 changes: 4 additions & 1 deletion binding/react-native/android/build.gradle
Original file line number Diff line number Diff line change
@@ -3,6 +3,9 @@ buildscript {
repositories {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1355/'
}
}

dependencies {
@@ -129,5 +132,5 @@ repositories {
dependencies {
// noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
implementation 'ai.picovoice:cheetah-android:2.0.0'
implementation 'ai.picovoice:cheetah-android:2.1.0'
}
2 changes: 1 addition & 1 deletion binding/react-native/cheetah-react-native.podspec
Original file line number Diff line number Diff line change
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
s.source_files = "ios/*.{h,m,mm,swift}"

s.dependency "React"
s.dependency "Cheetah-iOS", '~> 2.0.1'
s.dependency "Cheetah-iOS", '~> 2.1.0'
end
2 changes: 1 addition & 1 deletion binding/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@picovoice/cheetah-react-native",
"version": "2.0.2",
"version": "2.1.0",
"description": "Picovoice Cheetah React Native binding",
"main": "lib/commonjs/index",
"module": "lib/module/index",
56 changes: 28 additions & 28 deletions binding/react-native/test-app/CheetahTestApp/Tests.ts
Original file line number Diff line number Diff line change
@@ -4,17 +4,11 @@ import {decode as atob} from 'base-64';

import {Cheetah} from '@picovoice/cheetah-react-native';

const testData = require('./test_data.json');
const platform = Platform.OS;

const TEST_ACCESS_KEY: string = '{TESTING_ACCESS_KEY_HERE}';

const LANGUAGE = 'en';
const AUDIO_FILE = 'test.wav';
const EXPECTED_TRANSCRIPT =
'Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.';
const PUNCTUATIONS = ['.'];
const ERROR_RATE = 0.025;

export type Result = {
testName: string;
success: boolean;
@@ -242,28 +236,34 @@ async function initTests(): Promise<Result[]> {
async function processTests(): Promise<Result[]> {
const results: Result[] = [];

let result = await runProcTestCase(
LANGUAGE,
AUDIO_FILE,
EXPECTED_TRANSCRIPT,
PUNCTUATIONS,
ERROR_RATE,
);
logResult(result);
results.push(result);
for (const testParam of testData.tests.language_tests) {
const result = await runProcTestCase(
testParam.language,
testParam.audio_file,
testParam.transcript,
testParam.punctuations,
testParam.error_rate,
);
result.testName = `Process test for '${testParam.language}'`;
logResult(result);
results.push(result);
}

result = await runProcTestCase(
LANGUAGE,
AUDIO_FILE,
EXPECTED_TRANSCRIPT,
PUNCTUATIONS,
ERROR_RATE,
{
enablePunctuation: true,
},
);
logResult(result);
results.push(result);
for (const testParam of testData.tests.language_tests) {
const result = await runProcTestCase(
testParam.language,
testParam.audio_file,
testParam.transcript,
testParam.punctuations,
testParam.error_rate,
{
enablePunctuation: true,
},
);
result.testName = `Process test with punctuation for '${testParam.language}'`;
logResult(result);
results.push(result);
}

return results;
}
Original file line number Diff line number Diff line change
@@ -14,6 +14,9 @@ buildscript {
repositories {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1355/'
}
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
@@ -36,6 +39,9 @@ allprojects {

allprojects {
repositories {
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1355/'
}
maven {
url("$rootDir/../node_modules/detox/Detox-android")
}
Original file line number Diff line number Diff line change
@@ -18,3 +18,6 @@ mkdir -p ${ANDROID_ASSETS_DIR}/model_files
mkdir -p ${IOS_ASSETS_DIR}/model_files
cp ${LIB_DIR}/common/*.pv ${ANDROID_ASSETS_DIR}/model_files
cp ${LIB_DIR}/common/*.pv ${IOS_ASSETS_DIR}/model_files

echo "Copying test data file..."
cp ${RESOURCE_DIR}/.test/test_data.json .
3 changes: 2 additions & 1 deletion binding/react-native/test-app/CheetahTestApp/ios/Podfile
Original file line number Diff line number Diff line change
@@ -14,7 +14,8 @@ end

target 'CheetahTestApp' do
config = use_native_modules!
pod 'Cheetah-iOS', '~> 2.0.0'
# pod 'Cheetah-iOS', '~> 2.1.0'
pod 'Cheetah-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/cheetah/v2.1-react-native/binding/ios/Cheetah-iOS.podspec'

# Flags change depending on the env values.
flags = get_default_flags()
6 changes: 6 additions & 0 deletions demo/react-native/android/build.gradle
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@ buildscript {
repositories {
google()
jcenter()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1355/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
@@ -31,5 +34,8 @@ allprojects {
google()
jcenter()
maven { url 'https://www.jitpack.io' }
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1355/'
}
}
}
1 change: 1 addition & 0 deletions demo/react-native/ios/Podfile
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ platform :ios, '13.0'

target 'CheetahDemo' do
config = use_native_modules!
pod 'Cheetah-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/cheetah/v2.1-react-native/binding/ios/Cheetah-iOS.podspec'
use_react_native!(:path => config["reactNativePath"])
end

21 changes: 14 additions & 7 deletions demo/react-native/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PODS:
- boost (1.76.0)
- Cheetah-iOS (2.0.1)
- cheetah-react-native (2.0.2):
- Cheetah-iOS (~> 2.0.1)
- Cheetah-iOS (2.1.0)
- cheetah-react-native (2.1.0):
- Cheetah-iOS (~> 2.1.0)
- React
- DoubleConversion (1.1.6)
- FBLazyVector (0.68.7)
@@ -299,6 +299,7 @@ PODS:

DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- Cheetah-iOS (from `https://raw.githubusercontent.com/Picovoice/cheetah/v2.1-react-native/binding/ios/Cheetah-iOS.podspec`)
- "cheetah-react-native (from `../node_modules/@picovoice/cheetah-react-native`)"
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
@@ -338,13 +339,14 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- Cheetah-iOS
- fmt
- ios-voice-processor

EXTERNAL SOURCES:
boost:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
Cheetah-iOS:
:podspec: https://raw.githubusercontent.com/Picovoice/cheetah/v2.1-react-native/binding/ios/Cheetah-iOS.podspec
cheetah-react-native:
:path: "../node_modules/@picovoice/cheetah-react-native"
DoubleConversion:
@@ -414,10 +416,15 @@ EXTERNAL SOURCES:
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

CHECKOUT OPTIONS:
Cheetah-iOS:
:commit: b07ef50da9058941d268aee19932815f9bd471ba
:git: https://github.com/Picovoice/cheetah.git

SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
Cheetah-iOS: 2f1a662b84de3696498b9f9bbac3758b1b19ccb7
cheetah-react-native: 5ea29790b39efe5c2383f5d7f257e083cbb71d22
Cheetah-iOS: 3ad9ac1bd4f880a557ce7fe6fbe1fb1f0a7402f3
cheetah-react-native: dd709d4c52c07bf45828003b58fe4072783e4320
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
FBLazyVector: 63b89dc85804d5817261f56dc4cfb43a9b6d57f5
FBReactNativeSpec: 1fa200a9862d9369a53b6fddbbfcdc22bab24062
@@ -454,6 +461,6 @@ SPEC CHECKSUMS:
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
Yoga: 0bc4b37c3b8a345336ff601e2cf7d9704bab7e93

PODFILE CHECKSUM: 6f7cd523f67fd219238da59043721f083653eeba
PODFILE CHECKSUM: dea7c62235d55b5514625b6be593b3f4eb288d9a

COCOAPODS: 1.16.2
4 changes: 2 additions & 2 deletions demo/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cheetah-react-native-demo",
"version": "2.0.2",
"version": "2.1.0",
"private": true,
"scripts": {
"start": "react-native start",
@@ -16,7 +16,7 @@
"postinstall": "node copy.js"
},
"dependencies": {
"@picovoice/cheetah-react-native": "2.0.2",
"@picovoice/cheetah-react-native": "../../binding/react-native",
"@picovoice/react-native-voice-processor": "1.2.3",
"@react-native-picker/picker": "^1.9.2",
"react": "^17.0.2",
6 changes: 2 additions & 4 deletions demo/react-native/yarn.lock
Original file line number Diff line number Diff line change
@@ -1090,10 +1090,8 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@picovoice/cheetah-react-native@2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@picovoice/cheetah-react-native/-/cheetah-react-native-2.0.2.tgz#e82445cb61becb3a8f46078abe02885e98e17901"
integrity sha512-ciJj859CEBC90ZCj6fI6L0AwEgp7Sjlf+fn2hpGQJQglYtqqfeslWqggg2XAs9p1nbJIFGc9kipk6KwMU/LsaQ==
"@picovoice/cheetah-react-native@../../binding/react-native":
version "2.1.0"

"@picovoice/react-native-voice-processor@1.2.3":
version "1.2.3"