Skip to content

Commit d920062

Browse files
authored
Merge pull request #19 from Picovoice/v1.0-docs
Update docs + minor API change
2 parents 1066eee + c8e8959 commit d920062

File tree

34 files changed

+161
-116
lines changed

34 files changed

+161
-116
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ let package = Package(
2727
sources: [
2828
"binding/ios/Bat.swift",
2929
"binding/ios/BatErrors.swift",
30-
"binding/ios/BatLanguage.swift"
30+
"binding/ios/BatLanguages.swift"
3131
],
3232
resources: [
3333
.copy("lib/common/bat_params.pv")

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)
1313
[![Twitter URL](https://img.shields.io/twitter/url?label=%40AiPicovoice&style=social&url=https%3A%2F%2Ftwitter.com%2FAiPicovoice)](https://twitter.com/AiPicovoice)<!-- markdown-link-check-disable-line -->
1414
[![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCAdi9sTCXLosG1XeqDwLx7w?label=YouTube&style=social)](https://www.youtube.com/channel/UCAdi9sTCXLosG1XeqDwLx7w)
1515

16-
Bat is an on-device spoken language understanding engine. Bat is:
16+
Bat is an on-device spoken language identification engine. Bat is:
1717

1818
- Private; All voice processing runs locally.
1919
- Cross-Platform:
@@ -55,7 +55,7 @@ AccessKey also verifies that your usage is within the limits of your account. Yo
5555

5656
## Language Support
5757

58-
- Bat spoken language understanding currently supports English, French, Spanish, Italian, German, Portuguese, Japanese, and Korean.
58+
- Bat spoken language identification currently supports English, French, Spanish, Italian, German, Portuguese, Japanese, and Korean.
5959

6060
## Demos
6161

binding/android/Bat/bat/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22

33
ext {
44
PUBLISH_GROUP_ID = 'ai.picovoice'
5-
PUBLISH_VERSION = '1.0.0'
5+
PUBLISH_VERSION = '1.0.1'
66
PUBLISH_ARTIFACT_ID = 'bat-android'
77
}
88
android {

binding/android/Bat/bat/src/main/java/ai/picovoice/bat/Bat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.util.HashMap;
2424

2525
/**
26-
* Android binding for Bat spoken language understanding engine.
26+
* Android binding for Bat spoken language identification engine.
2727
*/
2828
public class Bat {
2929

@@ -246,7 +246,7 @@ public Builder setVoiceThreshold(float voiceThreshold) {
246246
}
247247

248248
/**
249-
* Validates properties and creates an instance of the Bat spoken language understanding engine.
249+
* Validates properties and creates an instance of the Bat spoken language identification engine.
250250
*
251251
* @return An instance of Bat Engine
252252
* @throws BatException if there is an error while initializing Bat.

binding/android/Bat/bat/src/main/java/ai/picovoice/bat/BatLanguages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
package ai.picovoice.bat;
1515

1616
/**
17-
* Bat spoken language understanding engine Languages Object.
17+
* Bat spoken language identification engine Languages Object.
1818
*/
1919
public enum BatLanguages {
2020
UNKNOWN(0),

binding/android/BatTestApp/bat-test-app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ dependencies {
151151
implementation 'com.google.android.material:material:1.6.1'
152152
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
153153
implementation 'com.google.code.gson:gson:2.10'
154-
implementation 'ai.picovoice:bat-android:1.0.0'
154+
implementation 'ai.picovoice:bat-android:1.0.1'
155155

156156
// Espresso UI Testing
157157
androidTestImplementation 'androidx.test.ext:junit:1.1.3'

binding/android/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Bat Binding for Android
22

3-
## Bat Spoken Language Understanding Engine
3+
## Bat Spoken Language Identification Engine
44

55
Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)
66

7-
Bat is an on-device spoken language understanding engine. Bat is:
7+
Bat is an on-device spoken language identification engine. Bat is:
88

99
- Private; All voice processing runs locally.
1010
- Cross-Platform:

binding/ios/Bat-iOS.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = 'Bat-iOS'
33
s.module_name = 'Bat'
4-
s.version = '1.0.0'
4+
s.version = '1.0.1'
55
s.license = {:type => 'Apache 2.0'}
6-
s.summary = 'iOS SDK for Picovoice\'s Bat spoken language understanding engine.'
6+
s.summary = 'iOS SDK for Picovoice\'s Bat spoken language identification engine.'
77
s.description =
88
<<-DESC
9-
Bat is an on-device streaming spoken language understanding engine.
9+
Bat is an on-device streaming spoken language identification engine.
1010
1111
Bat is:
1212
- Private, all voice processing runs locally.

binding/ios/Bat.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111

1212
import PvBat
1313

14-
/// iOS binding for Bat spoken language understanding engine. Provides a Swift interface to the Bat library.
14+
/// iOS binding for Bat spoken language identification engine. Provides a Swift interface to the Bat library.
1515
public class Bat {
1616

1717
#if SWIFT_PACKAGE
@@ -164,9 +164,9 @@ public class Bat {
164164
/// - Throws: BatError
165165
/// - Returns: Detection score for each supported language. The scores are in the range [0, 1]
166166
/// with 1 being maximum confidence in a detection. The index of each scores corresponds
167-
/// to the `BatLanguage` enum value, and the length of the array is `BatLanguage.numLanguages()`
167+
/// to the `BatLanguages` enum value, and the length of the array is `BatLanguages.numLanguages()`
168168
/// elements long. If `nil` is returned, Bat did not detect usable voice in the frame.
169-
public func process(_ pcm: [Int16]) throws -> [BatLanguage: Float32]? {
169+
public func process(_ pcm: [Int16]) throws -> [BatLanguages: Float32]? {
170170
if handle == nil {
171171
throw BatInvalidStateError("Bat must be initialized before processing")
172172
}
@@ -185,9 +185,9 @@ public class Bat {
185185
}
186186

187187
if cScores != nil {
188-
var scores: [BatLanguage: Float32] = [:]
189-
for i in 0..<BatLanguage.numLanguages() {
190-
let language = BatLanguage(rawValue: Int(i)) ?? BatLanguage.UNKNOWN
188+
var scores: [BatLanguages: Float32] = [:]
189+
for i in 0..<BatLanguages.numLanguages() {
190+
let language = BatLanguages(rawValue: Int(i)) ?? BatLanguages.UNKNOWN
191191
scores[language] = cScores![Int(i)]
192192
}
193193
pv_bat_scores_delete(cScores)

binding/ios/BatAppTest/BatAppTest.xcodeproj/project.pbxproj

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
/* Begin PBXBuildFile section */
1010
072F6D492D02533000E29DF3 /* test_resources in Resources */ = {isa = PBXBuildFile; fileRef = 072F6D482D02533000E29DF3 /* test_resources */; };
1111
0742BA092F7DC33E0084B9D5 /* Bat in Frameworks */ = {isa = PBXBuildFile; productRef = 0742BA082F7DC33E0084B9D5 /* Bat */; };
12+
075840692F842CC5006C57EB /* Bat in Frameworks */ = {isa = PBXBuildFile; productRef = 075840682F842CC5006C57EB /* Bat */; };
1213
076CC4842E15FB93004995F2 /* Bat in Frameworks */ = {isa = PBXBuildFile; productRef = 076CC4832E15FB93004995F2 /* Bat */; };
14+
07A299042F8439DC00624AF5 /* Bat in Frameworks */ = {isa = PBXBuildFile; productRef = 07A299032F8439DC00624AF5 /* Bat */; };
1315
1E00655827CFF7EB006FF6E9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E00655727CFF7EB006FF6E9 /* AppDelegate.swift */; };
1416
1E00655C27CFF7EB006FF6E9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E00655B27CFF7EB006FF6E9 /* ViewController.swift */; };
1517
1E00655F27CFF7EB006FF6E9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E00655D27CFF7EB006FF6E9 /* Main.storyboard */; };
@@ -82,6 +84,8 @@
8284
files = (
8385
0742BA092F7DC33E0084B9D5 /* Bat in Frameworks */,
8486
076CC4842E15FB93004995F2 /* Bat in Frameworks */,
87+
07A299042F8439DC00624AF5 /* Bat in Frameworks */,
88+
075840692F842CC5006C57EB /* Bat in Frameworks */,
8589
5A1C386D2EE8DA7900FEF522 /* Bat in Frameworks */,
8690
);
8791
runOnlyForDeploymentPostprocessing = 0;
@@ -295,7 +299,7 @@
295299
);
296300
mainGroup = 1E00654B27CFF7EB006FF6E9;
297301
packageReferences = (
298-
0742BA072F7DC33E0084B9D5 /* XCRemoteSwiftPackageReference "bat" */,
302+
07A299022F8439DC00624AF5 /* XCRemoteSwiftPackageReference "bat" */,
299303
);
300304
productRefGroup = 1E00655527CFF7EB006FF6E9 /* Products */;
301305
projectDirPath = "";
@@ -731,6 +735,14 @@
731735
version = 2.2.0;
732736
};
733737
};
738+
07A299022F8439DC00624AF5 /* XCRemoteSwiftPackageReference "bat" */ = {
739+
isa = XCRemoteSwiftPackageReference;
740+
repositoryURL = "https://github.com/Picovoice/bat";
741+
requirement = {
742+
kind = exactVersion;
743+
version = 1.0.1;
744+
};
745+
};
734746
/* End XCRemoteSwiftPackageReference section */
735747

736748
/* Begin XCSwiftPackageProductDependency section */
@@ -739,11 +751,20 @@
739751
package = 0742BA072F7DC33E0084B9D5 /* XCRemoteSwiftPackageReference "bat" */;
740752
productName = Bat;
741753
};
754+
075840682F842CC5006C57EB /* Bat */ = {
755+
isa = XCSwiftPackageProductDependency;
756+
productName = Bat;
757+
};
742758
076CC4832E15FB93004995F2 /* Bat */ = {
743759
isa = XCSwiftPackageProductDependency;
744760
package = 076CC4822E15FB93004995F2 /* XCRemoteSwiftPackageReference "bat" */;
745761
productName = Bat;
746762
};
763+
07A299032F8439DC00624AF5 /* Bat */ = {
764+
isa = XCSwiftPackageProductDependency;
765+
package = 07A299022F8439DC00624AF5 /* XCRemoteSwiftPackageReference "bat" */;
766+
productName = Bat;
767+
};
747768
5A0637302F6230890037D526 /* Bat */ = {
748769
isa = XCSwiftPackageProductDependency;
749770
productName = Bat;

0 commit comments

Comments
 (0)