diff --git a/README.md b/README.md index 7ab95282..dbc821b0 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,6 @@ voice assistants. Orca is: - Raspberry Pi (3, 4, 5) - Chrome, Safari, Firefox, and Edge -**Please note that Orca is currently in development. While we prioritize stability and compatibility, certain aspects of -Orca may undergo changes as we continually enhance and refine the engine to provide the best user experience possible.** - ## Table of Contents - [Orca](#orca) @@ -57,7 +54,7 @@ Orca may undergo changes as we continually enhance and refine the engine to prov ## Language Support -- Orca Text-to-Speech currently supports English only. +- Orca Streaming Text-to-Speech currently supports English only. - Support for [additional languages is available for commercial customers](https://picovoice.ai/consulting/) on a case-by-case basis. @@ -65,7 +62,7 @@ Orca may undergo changes as we continually enhance and refine the engine to prov ### Orca input and output streaming synthesis -Orca is a text-to-speech engine designed specifically for LLMs. It can process +Orca is a streaming text-to-speech engine designed specifically for LLMs. It can process incoming text streams in real-time, generating audio continuously, i.e., as the LLM produces tokens, Orca generates speech in parallel. This enables seamless conversations with voice assistants, eliminating any audio delays. @@ -76,9 +73,9 @@ Orca also supports single synthesis mode, where a complete text is synthesized i ### Text input -Orca accepts the 26 lowercase (a-z) and 26 uppercase (A-Z) letters of the English alphabet, numbers, -basic symbols, as well as common punctuation marks. You can get a list of all supported characters by calling the -`valid_characters()` method provided in the Orca SDK you are using. +Orca supports a wide range of English characters, including letters, numbers, symbols, and punctuation marks. +You can get a list of all supported characters by calling the `valid_characters()` method provided +in the Orca SDK you are using. Pronunciations of characters or words not supported by this list can be achieved with [custom pronunciations](#custom-pronunciations). @@ -683,6 +680,13 @@ For more details, see the [Node.js SDK](./binding/nodejs/). ## Releases +### v1.0.0 - Aug 20th, 2024 + +- Improved voice quality +- Significantly reduced latency in streaming synthesis +- Reduced model size +- Advanced text normalization + ### v0.2.0 - May 3rd, 2024 - Support for streaming synthesis diff --git a/binding/android/Orca/orca/build.gradle b/binding/android/Orca/orca/build.gradle index defe1e17..c885013c 100644 --- a/binding/android/Orca/orca/build.gradle +++ b/binding/android/Orca/orca/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ext { PUBLISH_GROUP_ID = 'ai.picovoice' - PUBLISH_VERSION = '0.2.1' + PUBLISH_VERSION = '1.0.0' PUBLISH_ARTIFACT_ID = 'orca-android' } @@ -15,7 +15,7 @@ android { minSdkVersion 21 targetSdkVersion defaultTargetSdkVersion versionCode 2 - versionName "0.2.1" + versionName "1.0.0" consumerProguardFiles "consumer-rules.pro" } diff --git a/binding/android/OrcaTestApp/orca-test-app/build.gradle b/binding/android/OrcaTestApp/orca-test-app/build.gradle index 90f65152..41631a5b 100644 --- a/binding/android/OrcaTestApp/orca-test-app/build.gradle +++ b/binding/android/OrcaTestApp/orca-test-app/build.gradle @@ -106,7 +106,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'ai.picovoice:orca-android:0.2.1' + implementation 'ai.picovoice:orca-android:1.0.0' // Espresso UI Testing androidTestImplementation 'androidx.test.ext:junit:1.1.5' @@ -115,7 +115,7 @@ dependencies { }) androidTestImplementation('com.microsoft.appcenter:espresso-test-extension:1.4') androidTestImplementation('androidx.test.espresso:espresso-intents:3.5.1') - androidTestImplementation('ai.picovoice:orca-android:0.2.1') + androidTestImplementation('ai.picovoice:orca-android:1.0.0') } afterEvaluate { diff --git a/binding/android/OrcaTestApp/orca-test-app/src/androidTest/java/ai/picovoice/orca/testapp/OrcaTest.java b/binding/android/OrcaTestApp/orca-test-app/src/androidTest/java/ai/picovoice/orca/testapp/OrcaTest.java index 0f9bda25..158fe2ed 100644 --- a/binding/android/OrcaTestApp/orca-test-app/src/androidTest/java/ai/picovoice/orca/testapp/OrcaTest.java +++ b/binding/android/OrcaTestApp/orca-test-app/src/androidTest/java/ai/picovoice/orca/testapp/OrcaTest.java @@ -12,7 +12,6 @@ package ai.picovoice.orca.testapp; -import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; diff --git a/binding/ios/Orca-iOS.podspec b/binding/ios/Orca-iOS.podspec index ff16a970..a3f60fa0 100644 --- a/binding/ios/Orca-iOS.podspec +++ b/binding/ios/Orca-iOS.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Orca-iOS' s.module_name = 'Orca' - s.version = '0.2.2' + s.version = '1.0.0' s.license = {:type => 'Apache 2.0'} s.summary = 'iOS binding for Picovoice\'s Orca Text-to-Speech Engine.' s.description = @@ -18,7 +18,7 @@ Pod::Spec.new do |s| DESC s.homepage = 'https://github.com/Picovoice/orca/tree/main/binding/ios' s.author = { 'Picovoice' => 'hello@picovoice.ai' } - s.source = { :git => "https://github.com/Picovoice/orca.git", :tag => "Orca-iOS-v0.2.2" } + s.source = { :git => "https://github.com/Picovoice/orca.git", :tag => "Orca-iOS-v1.0.0" } s.ios.deployment_target = '13.0' s.swift_version = '5.0' s.vendored_frameworks = 'lib/ios/PvOrca.xcframework' diff --git a/binding/ios/OrcaAppTest/OrcaAppTest.xcodeproj/project.pbxproj b/binding/ios/OrcaAppTest/OrcaAppTest.xcodeproj/project.pbxproj index 26baa319..ff066e32 100644 --- a/binding/ios/OrcaAppTest/OrcaAppTest.xcodeproj/project.pbxproj +++ b/binding/ios/OrcaAppTest/OrcaAppTest.xcodeproj/project.pbxproj @@ -18,10 +18,10 @@ 1EAEDDE12B745E6A003B8C18 /* BaseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EAEDDDF2B745E6A003B8C18 /* BaseTest.swift */; }; 1EAEDDE32B76A9DB003B8C18 /* test_resources in Resources */ = {isa = PBXBuildFile; fileRef = 1EAEDDE22B76A9DB003B8C18 /* test_resources */; }; 1EAEDDE42B76A9DB003B8C18 /* test_resources in Resources */ = {isa = PBXBuildFile; fileRef = 1EAEDDE22B76A9DB003B8C18 /* test_resources */; }; - 23B5F83DEFB19D228DE964B8 /* libPods-OrcaAppTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F01EB231EDD1EF54AA07C62C /* libPods-OrcaAppTest.a */; }; + 1F5456F1ABF15D6BBF501EFF /* libPods-PerformanceTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 058E26F515F02E02B119F1EC /* libPods-PerformanceTest.a */; }; + 4BBFF5433BEE1ED5C7D5070F /* libPods-OrcaAppTestUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B766C8F48740C4B780EC15F /* libPods-OrcaAppTestUITests.a */; }; 6A9164E4B0B1626D27DBA0A1 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; - 70CF5248EFD5D183CEEBB51A /* libPods-OrcaAppTestUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 440AF0F30A0107761DEA641F /* libPods-OrcaAppTestUITests.a */; }; - B2192F48A17BAD6A0DB4A0B0 /* libPods-PerformanceTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A7DF513036071631BBD968C8 /* libPods-PerformanceTest.a */; }; + 918B5B3AE3470D18CEC7EE3F /* libPods-OrcaAppTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C853E8FBBDACFDBBD873D739 /* libPods-OrcaAppTest.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,7 +42,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1B750551FE4E12DD2BE3FFA9 /* Pods-OrcaAppTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTest.debug.xcconfig"; path = "Target Support Files/Pods-OrcaAppTest/Pods-OrcaAppTest.debug.xcconfig"; sourceTree = ""; }; + 03C0CE0A935FE6DA043E7BE0 /* Pods-OrcaAppTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTest.debug.xcconfig"; path = "Target Support Files/Pods-OrcaAppTest/Pods-OrcaAppTest.debug.xcconfig"; sourceTree = ""; }; + 058E26F515F02E02B119F1EC /* libPods-PerformanceTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PerformanceTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1E00644827CEDF9B006FF6E9 /* OrcaAppTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OrcaAppTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1E00644B27CEDF9B006FF6E9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 1E00644F27CEDF9B006FF6E9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -58,14 +59,13 @@ 1E5B7AEF2800B2E300F8BDDB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1EAEDDDF2B745E6A003B8C18 /* BaseTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTest.swift; sourceTree = ""; }; 1EAEDDE22B76A9DB003B8C18 /* test_resources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = test_resources; sourceTree = ""; }; - 2D8652DC4398EB65AEB7900E /* Pods-OrcaAppTestUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTestUITests.debug.xcconfig"; path = "Target Support Files/Pods-OrcaAppTestUITests/Pods-OrcaAppTestUITests.debug.xcconfig"; sourceTree = ""; }; - 440AF0F30A0107761DEA641F /* libPods-OrcaAppTestUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrcaAppTestUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 51B364EA4D7DAB3E6FC8D40C /* Pods-OrcaAppTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTest.release.xcconfig"; path = "Target Support Files/Pods-OrcaAppTest/Pods-OrcaAppTest.release.xcconfig"; sourceTree = ""; }; - A7DF513036071631BBD968C8 /* libPods-PerformanceTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PerformanceTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - AB35F0D50B440E0DEA81B275 /* Pods-PerformanceTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PerformanceTest.release.xcconfig"; path = "Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest.release.xcconfig"; sourceTree = ""; }; - B9AB5B0E3C3BF7A7E91A96C5 /* Pods-PerformanceTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PerformanceTest.debug.xcconfig"; path = "Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest.debug.xcconfig"; sourceTree = ""; }; - C776CEF0F990BBA66089391D /* Pods-OrcaAppTestUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTestUITests.release.xcconfig"; path = "Target Support Files/Pods-OrcaAppTestUITests/Pods-OrcaAppTestUITests.release.xcconfig"; sourceTree = ""; }; - F01EB231EDD1EF54AA07C62C /* libPods-OrcaAppTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrcaAppTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4B766C8F48740C4B780EC15F /* libPods-OrcaAppTestUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrcaAppTestUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6912537E4CD8278005FA2AB6 /* Pods-PerformanceTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PerformanceTest.release.xcconfig"; path = "Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest.release.xcconfig"; sourceTree = ""; }; + 6F73701FE51DC1C6DF054890 /* Pods-PerformanceTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PerformanceTest.debug.xcconfig"; path = "Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest.debug.xcconfig"; sourceTree = ""; }; + ABBA4B73A0322098CBEC5924 /* Pods-OrcaAppTestUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTestUITests.release.xcconfig"; path = "Target Support Files/Pods-OrcaAppTestUITests/Pods-OrcaAppTestUITests.release.xcconfig"; sourceTree = ""; }; + ACAC7A21A5860A222D16D03A /* Pods-OrcaAppTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTest.release.xcconfig"; path = "Target Support Files/Pods-OrcaAppTest/Pods-OrcaAppTest.release.xcconfig"; sourceTree = ""; }; + C853E8FBBDACFDBBD873D739 /* libPods-OrcaAppTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrcaAppTest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E30EA9006E0548D0310B2E3A /* Pods-OrcaAppTestUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaAppTestUITests.debug.xcconfig"; path = "Target Support Files/Pods-OrcaAppTestUITests/Pods-OrcaAppTestUITests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -73,7 +73,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 23B5F83DEFB19D228DE964B8 /* libPods-OrcaAppTest.a in Frameworks */, + 918B5B3AE3470D18CEC7EE3F /* libPods-OrcaAppTest.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -82,7 +82,7 @@ buildActionMask = 2147483647; files = ( 6A9164E4B0B1626D27DBA0A1 /* BuildFile in Frameworks */, - 70CF5248EFD5D183CEEBB51A /* libPods-OrcaAppTestUITests.a in Frameworks */, + 4BBFF5433BEE1ED5C7D5070F /* libPods-OrcaAppTestUITests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -90,7 +90,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B2192F48A17BAD6A0DB4A0B0 /* libPods-PerformanceTest.a in Frameworks */, + 1F5456F1ABF15D6BBF501EFF /* libPods-PerformanceTest.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -106,7 +106,7 @@ 1E00646B27CEDF9C006FF6E9 /* OrcaAppTestUITests */, 1E00644927CEDF9B006FF6E9 /* Products */, FA7D97C92E04F06D3273CCF3 /* Pods */, - DE74BB91DE0DF6DC97C4AA8B /* Frameworks */, + 6ED9242E30E73A66AD589758 /* Frameworks */, ); sourceTree = ""; }; @@ -152,12 +152,12 @@ path = PerformanceTest; sourceTree = ""; }; - DE74BB91DE0DF6DC97C4AA8B /* Frameworks */ = { + 6ED9242E30E73A66AD589758 /* Frameworks */ = { isa = PBXGroup; children = ( - F01EB231EDD1EF54AA07C62C /* libPods-OrcaAppTest.a */, - 440AF0F30A0107761DEA641F /* libPods-OrcaAppTestUITests.a */, - A7DF513036071631BBD968C8 /* libPods-PerformanceTest.a */, + C853E8FBBDACFDBBD873D739 /* libPods-OrcaAppTest.a */, + 4B766C8F48740C4B780EC15F /* libPods-OrcaAppTestUITests.a */, + 058E26F515F02E02B119F1EC /* libPods-PerformanceTest.a */, ); name = Frameworks; sourceTree = ""; @@ -165,12 +165,12 @@ FA7D97C92E04F06D3273CCF3 /* Pods */ = { isa = PBXGroup; children = ( - 1B750551FE4E12DD2BE3FFA9 /* Pods-OrcaAppTest.debug.xcconfig */, - 51B364EA4D7DAB3E6FC8D40C /* Pods-OrcaAppTest.release.xcconfig */, - 2D8652DC4398EB65AEB7900E /* Pods-OrcaAppTestUITests.debug.xcconfig */, - C776CEF0F990BBA66089391D /* Pods-OrcaAppTestUITests.release.xcconfig */, - B9AB5B0E3C3BF7A7E91A96C5 /* Pods-PerformanceTest.debug.xcconfig */, - AB35F0D50B440E0DEA81B275 /* Pods-PerformanceTest.release.xcconfig */, + 03C0CE0A935FE6DA043E7BE0 /* Pods-OrcaAppTest.debug.xcconfig */, + ACAC7A21A5860A222D16D03A /* Pods-OrcaAppTest.release.xcconfig */, + E30EA9006E0548D0310B2E3A /* Pods-OrcaAppTestUITests.debug.xcconfig */, + ABBA4B73A0322098CBEC5924 /* Pods-OrcaAppTestUITests.release.xcconfig */, + 6F73701FE51DC1C6DF054890 /* Pods-PerformanceTest.debug.xcconfig */, + 6912537E4CD8278005FA2AB6 /* Pods-PerformanceTest.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -182,11 +182,11 @@ isa = PBXNativeTarget; buildConfigurationList = 1E00647227CEDF9C006FF6E9 /* Build configuration list for PBXNativeTarget "OrcaAppTest" */; buildPhases = ( - 98B5787CA085209AE3EC7CD3 /* [CP] Check Pods Manifest.lock */, + E428D99F4C1179AF0A93FF51 /* [CP] Check Pods Manifest.lock */, 1E00644427CEDF9B006FF6E9 /* Sources */, 1E00644527CEDF9B006FF6E9 /* Frameworks */, 1E00644627CEDF9B006FF6E9 /* Resources */, - 75C82358FB8F66E328C28F61 /* [CP] Embed Pods Frameworks */, + C8D12D9BE774ED58ABA1FF45 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -201,11 +201,11 @@ isa = PBXNativeTarget; buildConfigurationList = 1E00647827CEDF9C006FF6E9 /* Build configuration list for PBXNativeTarget "OrcaAppTestUITests" */; buildPhases = ( - 16FE6459EB7B2322302675E0 /* [CP] Check Pods Manifest.lock */, + 468A10AEF25E811ADB64A584 /* [CP] Check Pods Manifest.lock */, 1E00646427CEDF9C006FF6E9 /* Sources */, 1E00646527CEDF9C006FF6E9 /* Frameworks */, 1E00646627CEDF9C006FF6E9 /* Resources */, - 1E76A1239325D01476848FE0 /* [CP] Embed Pods Frameworks */, + C88D4DAF8C8059AE1BBD1DE2 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -221,11 +221,11 @@ isa = PBXNativeTarget; buildConfigurationList = 1E5B7AE92800B29F00F8BDDB /* Build configuration list for PBXNativeTarget "PerformanceTest" */; buildPhases = ( - 7873D3E06BCE81EB49116FB2 /* [CP] Check Pods Manifest.lock */, + FF3A6DEB00D6B25C80EF3B3D /* [CP] Check Pods Manifest.lock */, 1E5B7AE22800B29F00F8BDDB /* Sources */, 1E5B7AE42800B29F00F8BDDB /* Frameworks */, 1E5B7AE62800B29F00F8BDDB /* Resources */, - 9E515F735608EDEA67AFAB7D /* [CP] Embed Pods Frameworks */, + 46472F778FE419499A60120C /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -310,7 +310,24 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 16FE6459EB7B2322302675E0 /* [CP] Check Pods Manifest.lock */ = { + 46472F778FE419499A60120C /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 468A10AEF25E811ADB64A584 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -332,7 +349,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 1E76A1239325D01476848FE0 /* [CP] Embed Pods Frameworks */ = { + C88D4DAF8C8059AE1BBD1DE2 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -349,7 +366,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OrcaAppTestUITests/Pods-OrcaAppTestUITests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 75C82358FB8F66E328C28F61 /* [CP] Embed Pods Frameworks */ = { + C8D12D9BE774ED58ABA1FF45 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -366,7 +383,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OrcaAppTest/Pods-OrcaAppTest-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 7873D3E06BCE81EB49116FB2 /* [CP] Check Pods Manifest.lock */ = { + E428D99F4C1179AF0A93FF51 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -381,14 +398,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PerformanceTest-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-OrcaAppTest-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 98B5787CA085209AE3EC7CD3 /* [CP] Check Pods Manifest.lock */ = { + FF3A6DEB00D6B25C80EF3B3D /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -403,30 +420,13 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OrcaAppTest-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-PerformanceTest-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 9E515F735608EDEA67AFAB7D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformanceTest/Pods-PerformanceTest-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -608,7 +608,7 @@ }; 1E00647327CEDF9C006FF6E9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1B750551FE4E12DD2BE3FFA9 /* Pods-OrcaAppTest.debug.xcconfig */; + baseConfigurationReference = 03C0CE0A935FE6DA043E7BE0 /* Pods-OrcaAppTest.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -639,7 +639,7 @@ }; 1E00647427CEDF9C006FF6E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 51B364EA4D7DAB3E6FC8D40C /* Pods-OrcaAppTest.release.xcconfig */; + baseConfigurationReference = ACAC7A21A5860A222D16D03A /* Pods-OrcaAppTest.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -670,7 +670,7 @@ }; 1E00647927CEDF9C006FF6E9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2D8652DC4398EB65AEB7900E /* Pods-OrcaAppTestUITests.debug.xcconfig */; + baseConfigurationReference = E30EA9006E0548D0310B2E3A /* Pods-OrcaAppTestUITests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -693,7 +693,7 @@ }; 1E00647A27CEDF9C006FF6E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C776CEF0F990BBA66089391D /* Pods-OrcaAppTestUITests.release.xcconfig */; + baseConfigurationReference = ABBA4B73A0322098CBEC5924 /* Pods-OrcaAppTestUITests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -716,7 +716,7 @@ }; 1E5B7AEA2800B29F00F8BDDB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B9AB5B0E3C3BF7A7E91A96C5 /* Pods-PerformanceTest.debug.xcconfig */; + baseConfigurationReference = 6F73701FE51DC1C6DF054890 /* Pods-PerformanceTest.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; @@ -741,7 +741,7 @@ }; 1E5B7AEB2800B29F00F8BDDB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AB35F0D50B440E0DEA81B275 /* Pods-PerformanceTest.release.xcconfig */; + baseConfigurationReference = 6912537E4CD8278005FA2AB6 /* Pods-PerformanceTest.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; diff --git a/binding/ios/OrcaAppTest/OrcaAppTestUITests/BaseTest.swift b/binding/ios/OrcaAppTest/OrcaAppTestUITests/BaseTest.swift index 4228c9fc..7033ddfc 100644 --- a/binding/ios/OrcaAppTest/OrcaAppTestUITests/BaseTest.swift +++ b/binding/ios/OrcaAppTest/OrcaAppTestUITests/BaseTest.swift @@ -102,7 +102,7 @@ class BaseTest: XCTestCase { } func compareArrays(arr1: [Int16], arr2: [Int16], step: Int) -> Bool { - for i in stride(from: 0, to: arr1.count - step, by: step) where !(abs(arr1[i] - arr2[i]) <= 500) { + for i in stride(from: 0, to: arr1.count - step, by: step) where !(abs(arr1[i] - arr2[i]) <= 12000) { return false } return true diff --git a/binding/ios/OrcaAppTest/Podfile b/binding/ios/OrcaAppTest/Podfile index 78f09ebd..86efc831 100644 --- a/binding/ios/OrcaAppTest/Podfile +++ b/binding/ios/OrcaAppTest/Podfile @@ -2,13 +2,13 @@ source 'https://cdn.cocoapods.org/' platform :ios, '13.0' target 'OrcaAppTest' do - pod 'Orca-iOS', '~> 0.2.2' + pod 'Orca-iOS', '~> 1.0.0' end target 'OrcaAppTestUITests' do - pod 'Orca-iOS', '~> 0.2.2' + pod 'Orca-iOS', '~> 1.0.0' end target 'PerformanceTest' do - pod 'Orca-iOS', '~> 0.2.2' + pod 'Orca-iOS', '~> 1.0.0' end diff --git a/binding/ios/OrcaAppTest/Podfile.lock b/binding/ios/OrcaAppTest/Podfile.lock index bf25bff4..543cd9f0 100644 --- a/binding/ios/OrcaAppTest/Podfile.lock +++ b/binding/ios/OrcaAppTest/Podfile.lock @@ -1,16 +1,16 @@ PODS: - - Orca-iOS (0.2.2) + - Orca-iOS (1.0.0) DEPENDENCIES: - - Orca-iOS (~> 0.2.2) + - Orca-iOS (~> 1.0.0) SPEC REPOS: trunk: - Orca-iOS SPEC CHECKSUMS: - Orca-iOS: 567ca0e53671d8fc28ba15338db8fe4ff5101d8d + Orca-iOS: d50a0dbbf596f20c6c2e2f727f20f72ac012aa0e -PODFILE CHECKSUM: 2deb98490df78cf895d797180dcfeccea4f2ad25 +PODFILE CHECKSUM: 85110c27ad76f2840ec98aff4c162e9ffc71a022 COCOAPODS: 1.15.2 diff --git a/binding/nodejs/package.json b/binding/nodejs/package.json index ad441303..2b6dd83d 100644 --- a/binding/nodejs/package.json +++ b/binding/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/orca-node", - "version": "0.2.1", + "version": "1.0.0", "description": "Picovoice Orca Node.js binding", "main": "dist/index.js", "types": "dist/types/index.d.ts", diff --git a/binding/nodejs/src/platforms.ts b/binding/nodejs/src/platforms.ts index 7ec0fbec..06cb93df 100644 --- a/binding/nodejs/src/platforms.ts +++ b/binding/nodejs/src/platforms.ts @@ -31,7 +31,6 @@ const PLATFORM_WINDOWS = 'windows'; const ARM_CPU_64 = '-aarch64'; const ARM_CPU_CORTEX_A53 = 'cortex-a53'; -const ARM_CPU_CORTEX_A57 = 'cortex-a57'; const ARM_CPU_CORTEX_A72 = 'cortex-a72'; const ARM_CPU_CORTEX_A76 = 'cortex-a76'; @@ -121,8 +120,6 @@ function getLinuxMachine(arch: string): string { switch (cpuPart) { case '0xd03': return ARM_CPU_CORTEX_A53 + archInfo; - case '0xd07': - return ARM_CPU_CORTEX_A57 + archInfo; case '0xd08': return ARM_CPU_CORTEX_A72 + archInfo; case '0xd0b': diff --git a/binding/python/_util.py b/binding/python/_util.py index b2186abe..2a936126 100644 --- a/binding/python/_util.py +++ b/binding/python/_util.py @@ -37,8 +37,6 @@ def _linux_machine() -> str: if "0xd03" == cpu_part: return "cortex-a53" + arch_info - elif "0xd07" == cpu_part: - return "cortex-a57" + arch_info elif "0xd08" == cpu_part: return "cortex-a72" + arch_info elif "0xd0b" == cpu_part: diff --git a/binding/python/setup.py b/binding/python/setup.py index 088185ef..901375ae 100644 --- a/binding/python/setup.py +++ b/binding/python/setup.py @@ -49,7 +49,7 @@ setuptools.setup( name="pvorca", - version="0.2.4", + version="1.0.0", author="Picovoice", author_email="hello@picovoice.ai", description="Orca Streaming Text-to-Speech Engine", diff --git a/binding/python/test_orca.py b/binding/python/test_orca.py index 0a74e278..7f05ebbe 100644 --- a/binding/python/test_orca.py +++ b/binding/python/test_orca.py @@ -23,8 +23,6 @@ class OrcaTestCase(unittest.TestCase): - EXACT_ALIGNMENT_TEST_MODEL_IDENTIFIER = "female" - access_key: str orcas: List[Orca] model_paths: List[str] @@ -48,7 +46,7 @@ def _test_audio(self, pcm: Sequence[int], ground_truth: Sequence[int]) -> None: pcm = pcm[:len(ground_truth)] # compensate for discrepancies due to wav header self.assertEqual(len(pcm), len(ground_truth)) for i in range(len(pcm)): - self.assertAlmostEqual(pcm[i], ground_truth[i], delta=8000) + self.assertAlmostEqual(pcm[i], ground_truth[i], delta=12000) def _test_equal_timestamp(self, timestamp: float, timestamp_truth: float) -> None: self.assertAlmostEqual(timestamp, timestamp_truth, places=2) @@ -105,7 +103,7 @@ def test_synthesize(self) -> None: def test_synthesize_alignment_exact(self) -> None: orca = [ orca for i, orca in enumerate(self.orcas) if - self.EXACT_ALIGNMENT_TEST_MODEL_IDENTIFIER in self.model_paths[i]].pop() + test_data.exact_alignment_test_model_identifier in self.model_paths[i]].pop() pcm, alignments = orca.synthesize(test_data.text_alignment, random_state=test_data.random_state) self.assertGreater(len(pcm), 0) @@ -115,7 +113,7 @@ def test_synthesize_alignment_exact(self) -> None: def test_synthesize_alignment(self) -> None: for i, orca in enumerate(self.orcas): - if self.EXACT_ALIGNMENT_TEST_MODEL_IDENTIFIER in self.model_paths[i]: + if test_data.exact_alignment_test_model_identifier in self.model_paths[i]: continue pcm, alignments = orca.synthesize(test_data.text_alignment, random_state=test_data.random_state) diff --git a/binding/python/test_util.py b/binding/python/test_util.py index 210ccc10..bde698dc 100644 --- a/binding/python/test_util.py +++ b/binding/python/test_util.py @@ -29,6 +29,7 @@ class TestData: alignments: Sequence[Orca.WordAlignment] random_state: int audio_data_folder: str + exact_alignment_test_model_identifier: str def read_wav_file(path: str) -> Sequence[int]: @@ -49,7 +50,7 @@ def get_test_data() -> TestData: test_data = json.loads(data_file.read()) alignments = [] - for word_data in test_data["alignments"]: + for word_data in test_data.pop("alignments"): phonemes = [] for phoneme_data in word_data["phonemes"]: phoneme = Orca.PhonemeAlignment( @@ -65,11 +66,11 @@ def get_test_data() -> TestData: phonemes=phonemes) alignments.append(word) + test_sentences = test_data.pop("test_sentences") test_data = TestData( alignments=alignments, - random_state=test_data["random_state"], - audio_data_folder=test_data["audio_data_folder"], - **test_data["test_sentences"]) + **test_data, + **test_sentences) return test_data diff --git a/binding/web/package.json b/binding/web/package.json index 2810548c..4f8f2abc 100644 --- a/binding/web/package.json +++ b/binding/web/package.json @@ -3,7 +3,7 @@ "description": "Orca Text-to-Speech engine for web browsers (via WebAssembly)", "author": "Picovoice Inc", "license": "Apache-2.0", - "version": "0.2.1", + "version": "1.0.0", "keywords": [ "orca", "web", @@ -33,7 +33,7 @@ "test-perf": "cypress run --spec test/orca_perf.test.ts" }, "dependencies": { - "@picovoice/web-utils": "=1.3.4" + "@picovoice/web-utils": "=1.4.2" }, "devDependencies": { "@babel/core": "^7.21.3", diff --git a/binding/web/src/orca.ts b/binding/web/src/orca.ts index 07cf52ab..211b4323 100644 --- a/binding/web/src/orca.ts +++ b/binding/web/src/orca.ts @@ -589,8 +589,8 @@ export class Orca { throw new OrcaErrors.OrcaOutOfMemoryError('malloc failed: Cannot allocate memory'); } - const memoryBufferView = new DataView(this._wasmMemory.buffer); - const memoryBufferUint8 = new Uint8Array(this._wasmMemory.buffer); + let memoryBufferView = new DataView(this._wasmMemory.buffer); + let memoryBufferUint8 = new Uint8Array(this._wasmMemory.buffer); const initStatus = await this._pvOrcaSynthesizeParamsInit(synthesizeParamsAddressAddress); if (initStatus !== PvStatus.SUCCESS) { @@ -690,6 +690,9 @@ export class Orca { await this._pvFree(textAddress); await this._pvOrcaSynthesizeParamsDelete(synthesizeParamsAddress); + memoryBufferView = new DataView(this._wasmMemory.buffer); + memoryBufferUint8 = new Uint8Array(this._wasmMemory.buffer); + if (synthesizeStatus !== PvStatus.SUCCESS) { const messageStack = await Orca.getMessageStack( this._pvGetErrorStack, @@ -928,7 +931,7 @@ export class Orca { private static async initWasm(accessKey: string, modelPath: string, wasmBase64: string): Promise { // A WebAssembly page has a constant size of 64KiB. -> 1MiB ~= 16 pages - const memory = new WebAssembly.Memory({ initial: 7500 }); + const memory = new WebAssembly.Memory({ initial: 1600 }); const memoryBufferUint8 = new Uint8Array(memory.buffer); const pvError = new PvError(); const exports = await buildWasm(memory, wasmBase64, pvError); @@ -1025,6 +1028,7 @@ export class Orca { objectAddressAddress); await pv_free(accessKeyAddress); await pv_free(modelPathAddress); + if (initStatus !== PvStatus.SUCCESS) { const messageStack = await Orca.getMessageStack( pv_get_error_stack, diff --git a/binding/web/src/orca_worker_handler.ts b/binding/web/src/orca_worker_handler.ts index 96c0c66d..f89eed81 100644 --- a/binding/web/src/orca_worker_handler.ts +++ b/binding/web/src/orca_worker_handler.ts @@ -92,7 +92,7 @@ self.onmessage = async function( self.postMessage({ command: 'error', status: PvStatus.RUNTIME_ERROR, - shortMessage: 'Orca synthesize error', + shortMessage: e.message, }); } } @@ -133,7 +133,7 @@ self.onmessage = async function( self.postMessage({ command: 'error', status: PvStatus.RUNTIME_ERROR, - shortMessage: 'Orca stream open error', + shortMessage: e.message, }); } } @@ -172,7 +172,7 @@ self.onmessage = async function( self.postMessage({ command: 'error', status: PvStatus.RUNTIME_ERROR, - shortMessage: 'Orca synthesize error', + shortMessage: e.message, }); } } diff --git a/binding/web/test/orca.test.ts b/binding/web/test/orca.test.ts index c3c56c9b..e4291673 100644 --- a/binding/web/test/orca.test.ts +++ b/binding/web/test/orca.test.ts @@ -29,11 +29,11 @@ const EXPECTED_VALID_CHARACTERS = [ '-', '/', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '@', '%', '&', '\n', '_', '(', ')', '°', 'º', - '²', '³', + '²', '³', '$', '€', '¥', '₪', '£', + '₩', '₺', '₱', '₽', '฿', '₴', '₹', + '¢', '+', '=', ]; -const EXACT_ALIGNMENT_TEST_MODEL_IDENTIFIER = 'female'; - const compareArrays = (arr1: Int16Array, arr2: Int16Array, step: number) => { expect(arr1.length).eq(arr2.length); for (let i = 0; i < arr1.length - step; i += step) { @@ -179,7 +179,7 @@ describe('Orca Binding', function() { } }); - if (modelFileSuffix === EXACT_ALIGNMENT_TEST_MODEL_IDENTIFIER) { + if (publicPath.includes(testData.exact_alignment_test_model_identifier)) { it(`should be able to process alignment exact [${modelFileSuffix}] (${instanceString})`, async () => { try { const orca = await instance.create( diff --git a/binding/web/yarn.lock b/binding/web/yarn.lock index 339fb685..efe59312 100644 --- a/binding/web/yarn.lock +++ b/binding/web/yarn.lock @@ -1122,10 +1122,10 @@ dependencies: commander "^9.2.0" -"@picovoice/web-utils@=1.3.4": - version "1.3.4" - resolved "https://registry.yarnpkg.com/@picovoice/web-utils/-/web-utils-1.3.4.tgz#de3c4afe39aaf6e620320e413bfdf69bd9921f5d" - integrity sha512-f5bh1jvlbK53EzGdbpbcvNDoz16wbuQ/Fkj+T0GDQulowky+u/HfGZJE7si4vQ/m/2Lctx07X8YxmUHlH2FKGg== +"@picovoice/web-utils@=1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@picovoice/web-utils/-/web-utils-1.4.2.tgz#2ddc44552d15fa1a4958e0c3384e58545255eea1" + integrity sha512-pF5Uw3Vm4mOWJ2H3Zc7E/nDr/O7OhbvgEK6W7cx9MNNK3qq51MqiGluPpZ8a2K61BuIzxcNMC1mXWpmIAWVolA== dependencies: commander "^10.0.1" diff --git a/demo/android/OrcaDemo/orca-demo-app/build.gradle b/demo/android/OrcaDemo/orca-demo-app/build.gradle index d9379792..df701367 100644 --- a/demo/android/OrcaDemo/orca-demo-app/build.gradle +++ b/demo/android/OrcaDemo/orca-demo-app/build.gradle @@ -33,7 +33,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'ai.picovoice:orca-android:0.2.1' + implementation 'ai.picovoice:orca-android:1.0.0' } tasks.register('copyParams', Copy) { diff --git a/demo/android/OrcaDemo/orca-demo-app/src/main/java/ai/picovoice/orcademo/MainActivity.java b/demo/android/OrcaDemo/orca-demo-app/src/main/java/ai/picovoice/orcademo/MainActivity.java index 3f9653c5..34a4ca12 100644 --- a/demo/android/OrcaDemo/orca-demo-app/src/main/java/ai/picovoice/orcademo/MainActivity.java +++ b/demo/android/OrcaDemo/orca-demo-app/src/main/java/ai/picovoice/orcademo/MainActivity.java @@ -134,9 +134,9 @@ public void afterTextChanged(Editable s) { public void onTextChanged(CharSequence s, int start, int before, int count) { runOnUiThread(() -> numCharsTextView.setText(String.format( - "%d/%d", - s.toString().length(), - orca.getMaxCharacterLimit())) + "%d/%d", + s.toString().length(), + orca.getMaxCharacterLimit())) ); validateText(s.toString()); } @@ -249,7 +249,7 @@ private void displayError(String message) { private void validateText(String text) { if (text.length() > 0) { - if (text.length() >= orca.getMaxCharacterLimit()) { + if (text.length() > orca.getMaxCharacterLimit()) { runOnUiThread(() -> { setUIState(UIState.ERROR); infoTextView.setText("Too many characters"); @@ -257,7 +257,7 @@ private void validateText(String text) { } else { Set invalidChars = new HashSet<>(); Matcher m = validationRegex.matcher(text); - while(m.find()) { + while (m.find()) { invalidChars.add(text.charAt(m.start())); } @@ -444,8 +444,11 @@ private void runStreamSynthesis(final String text) { CountDownLatch streamingAudioLatch = new CountDownLatch(1); executor.submit(() -> { + mainHandler.post(() -> { + streamTextView.setText(""); + }); + isStreamingText.set(true); - streamingSynthesisLatch.countDown(); String[] words = text.split(" "); for (String word : words) { @@ -455,9 +458,11 @@ private void runStreamSynthesis(final String text) { textStream.add(finalWord); streamTextView.append(finalWord); }); + streamingSynthesisLatch.countDown(); try { Thread.sleep(100); - } catch (InterruptedException ignored) { } + } catch (InterruptedException ignored) { + } } isStreamingText.set(false); @@ -466,7 +471,6 @@ private void runStreamSynthesis(final String text) { executorStreamingSynthesis.submit(() -> { try { mainHandler.post(() -> { - streamTextView.setText(""); streamSecsTextView.setText("Seconds of audio synthesized: 0.000s"); synthesizeButton.setEnabled(false); }); @@ -537,7 +541,7 @@ private void runStreamSynthesis(final String text) { audioTrack.play(); streamingAudioLatch.await(); - while(isQueueingStreamingPcm.get() || !pcmQueue.isEmpty()) { + while (isQueueingStreamingPcm.get() || !pcmQueue.isEmpty()) { if (!pcmQueue.isEmpty()) { short[] pcm = pcmQueue.poll(); if (pcm != null && pcm.length > 0) { @@ -549,7 +553,10 @@ private void runStreamSynthesis(final String text) { audioTrack.stop(); audioTrack.release(); - mainHandler.post(() -> setUIState(UIState.EDIT)); + mainHandler.post(() -> { + setUIState(UIState.EDIT); + streamTextView.setText(""); + }); } catch (Exception e) { mainHandler.post(() -> displayError(e.toString())); } diff --git a/demo/ios/OrcaDemo/OrcaDemo.xcodeproj/project.pbxproj b/demo/ios/OrcaDemo/OrcaDemo.xcodeproj/project.pbxproj index e0c91c4e..7a9b51fb 100644 --- a/demo/ios/OrcaDemo/OrcaDemo.xcodeproj/project.pbxproj +++ b/demo/ios/OrcaDemo/OrcaDemo.xcodeproj/project.pbxproj @@ -13,7 +13,7 @@ 02A1195F268D3FD600A2AC99 /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A1195E268D3FD600A2AC99 /* ViewModel.swift */; }; 1E001B682B76FFE700D8E72D /* AudioPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E001B672B76FFE700D8E72D /* AudioPlayer.swift */; }; 1E001B6A2B7D451200D8E72D /* orca_params_female.pv in Resources */ = {isa = PBXBuildFile; fileRef = 1E001B692B7D451200D8E72D /* orca_params_female.pv */; }; - 93BE66087E58F64A2193D44C /* libPods-OrcaDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6293833704AEC548A02FB651 /* libPods-OrcaDemo.a */; }; + D187B3DB6652943E66F16BCC /* libPods-OrcaDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A16735E20458FE8354BB7263 /* libPods-OrcaDemo.a */; }; E125E1892BE99DCA008B6D56 /* AtomicBool.swift in Sources */ = {isa = PBXBuildFile; fileRef = E125E1882BE99DCA008B6D56 /* AtomicBool.swift */; }; E1C5A45F2BE587A2002C0C40 /* AudioPlayerStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1C5A45E2BE587A2002C0C40 /* AudioPlayerStream.swift */; }; /* End PBXBuildFile section */ @@ -25,13 +25,13 @@ 02A1194C268D39AB00A2AC99 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 02A11951268D39AB00A2AC99 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 02A1195E268D3FD600A2AC99 /* ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = ""; }; - 1C5DAA8ED5D246C3A58AA45B /* Pods-OrcaDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaDemo.release.xcconfig"; path = "Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo.release.xcconfig"; sourceTree = ""; }; 1E001B672B76FFE700D8E72D /* AudioPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayer.swift; sourceTree = ""; }; 1E001B692B7D451200D8E72D /* orca_params_female.pv */ = {isa = PBXFileReference; lastKnownFileType = file; name = orca_params_female.pv; path = ../../../../lib/common/orca_params_female.pv; sourceTree = ""; }; - 3B38AA40E88807F9C21BFD02 /* Pods-OrcaDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaDemo.debug.xcconfig"; path = "Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo.debug.xcconfig"; sourceTree = ""; }; - 6293833704AEC548A02FB651 /* libPods-OrcaDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrcaDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 952242877925838A624DC6EA /* Pods-OrcaDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaDemo.debug.xcconfig"; path = "Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo.debug.xcconfig"; sourceTree = ""; }; + A16735E20458FE8354BB7263 /* libPods-OrcaDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OrcaDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E125E1882BE99DCA008B6D56 /* AtomicBool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AtomicBool.swift; sourceTree = ""; }; E1C5A45E2BE587A2002C0C40 /* AudioPlayerStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayerStream.swift; sourceTree = ""; }; + FB863F2AC73241BC3E22A12E /* Pods-OrcaDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OrcaDemo.release.xcconfig"; path = "Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -39,7 +39,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 93BE66087E58F64A2193D44C /* libPods-OrcaDemo.a in Frameworks */, + D187B3DB6652943E66F16BCC /* libPods-OrcaDemo.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -52,7 +52,7 @@ 02A11947268D39A700A2AC99 /* OrcaDemo */, 02A11946268D39A700A2AC99 /* Products */, 8DB92FF3DC81AB04D3FF7242 /* Pods */, - D4BC0C682CB4645A73894BC8 /* Frameworks */, + 44A2F7E874052A1B16DFF3C5 /* Frameworks */, ); sourceTree = ""; }; @@ -80,21 +80,21 @@ path = OrcaDemo; sourceTree = ""; }; - 8DB92FF3DC81AB04D3FF7242 /* Pods */ = { + 44A2F7E874052A1B16DFF3C5 /* Frameworks */ = { isa = PBXGroup; children = ( - 3B38AA40E88807F9C21BFD02 /* Pods-OrcaDemo.debug.xcconfig */, - 1C5DAA8ED5D246C3A58AA45B /* Pods-OrcaDemo.release.xcconfig */, + A16735E20458FE8354BB7263 /* libPods-OrcaDemo.a */, ); - path = Pods; + name = Frameworks; sourceTree = ""; }; - D4BC0C682CB4645A73894BC8 /* Frameworks */ = { + 8DB92FF3DC81AB04D3FF7242 /* Pods */ = { isa = PBXGroup; children = ( - 6293833704AEC548A02FB651 /* libPods-OrcaDemo.a */, + 952242877925838A624DC6EA /* Pods-OrcaDemo.debug.xcconfig */, + FB863F2AC73241BC3E22A12E /* Pods-OrcaDemo.release.xcconfig */, ); - name = Frameworks; + path = Pods; sourceTree = ""; }; /* End PBXGroup section */ @@ -104,11 +104,11 @@ isa = PBXNativeTarget; buildConfigurationList = 02A11954268D39AB00A2AC99 /* Build configuration list for PBXNativeTarget "OrcaDemo" */; buildPhases = ( - 953F197786B352AA828626D7 /* [CP] Check Pods Manifest.lock */, + D7D2DD072445DE47F8F0E6E9 /* [CP] Check Pods Manifest.lock */, 02A11941268D39A700A2AC99 /* Sources */, 02A11942268D39A700A2AC99 /* Frameworks */, 02A11943268D39A700A2AC99 /* Resources */, - C4DE16407A77E6DE174EE4DB /* [CP] Embed Pods Frameworks */, + 1FC98B8C46971659AF3FC4D2 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -164,43 +164,43 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 953F197786B352AA828626D7 /* [CP] Check Pods Manifest.lock */ = { + 1FC98B8C46971659AF3FC4D2 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OrcaDemo-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - C4DE16407A77E6DE174EE4DB /* [CP] Embed Pods Frameworks */ = { + D7D2DD072445DE47F8F0E6E9 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-OrcaDemo-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OrcaDemo/Pods-OrcaDemo-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -340,7 +340,7 @@ }; 02A11955268D39AB00A2AC99 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3B38AA40E88807F9C21BFD02 /* Pods-OrcaDemo.debug.xcconfig */; + baseConfigurationReference = 952242877925838A624DC6EA /* Pods-OrcaDemo.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -363,7 +363,7 @@ }; 02A11956268D39AB00A2AC99 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1C5DAA8ED5D246C3A58AA45B /* Pods-OrcaDemo.release.xcconfig */; + baseConfigurationReference = FB863F2AC73241BC3E22A12E /* Pods-OrcaDemo.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; diff --git a/demo/ios/OrcaDemo/Podfile b/demo/ios/OrcaDemo/Podfile index 67f72677..2f09f09a 100644 --- a/demo/ios/OrcaDemo/Podfile +++ b/demo/ios/OrcaDemo/Podfile @@ -2,5 +2,5 @@ source 'https://cdn.cocoapods.org/' platform :ios, '13.0' target 'OrcaDemo' do - pod 'Orca-iOS', '~> 0.2.2' + pod 'Orca-iOS', '~> 1.0.0' end diff --git a/demo/ios/OrcaDemo/Podfile.lock b/demo/ios/OrcaDemo/Podfile.lock index 958988c5..b8768fc3 100644 --- a/demo/ios/OrcaDemo/Podfile.lock +++ b/demo/ios/OrcaDemo/Podfile.lock @@ -1,16 +1,16 @@ PODS: - - Orca-iOS (0.2.2) + - Orca-iOS (1.0.0) DEPENDENCIES: - - Orca-iOS (~> 0.2.2) + - Orca-iOS (~> 1.0.0) SPEC REPOS: trunk: - Orca-iOS SPEC CHECKSUMS: - Orca-iOS: 567ca0e53671d8fc28ba15338db8fe4ff5101d8d + Orca-iOS: d50a0dbbf596f20c6c2e2f727f20f72ac012aa0e -PODFILE CHECKSUM: 118fa8c1767dd3edcc2ec366a16ab74191c6176c +PODFILE CHECKSUM: cfe48de1582b7218aa5c16f59fe450987cdec387 COCOAPODS: 1.15.2 diff --git a/demo/nodejs/package.json b/demo/nodejs/package.json index a8de4615..62656721 100644 --- a/demo/nodejs/package.json +++ b/demo/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/orca-node-demo", - "version": "0.2.2", + "version": "1.0.0", "description": "Picovoice Orca Node.js file-based and streaming demos", "scripts": { "file": "node file.js", @@ -21,7 +21,7 @@ "author": "Picovoice Inc.", "license": "Apache-2.0", "dependencies": { - "@picovoice/orca-node": "=0.2.1", + "@picovoice/orca-node": "=1.0.0", "@picovoice/pvspeaker-node": "^1.0.0", "commander": "^6.1.0", "prettier": "^2.6.2", diff --git a/demo/nodejs/streaming.js b/demo/nodejs/streaming.js index 35cfc588..9af9bdaa 100644 --- a/demo/nodejs/streaming.js +++ b/demo/nodejs/streaming.js @@ -132,8 +132,6 @@ function linuxMachine() { switch (cpuPart) { case '0xd03': return 'cortex-a53' + archInfo; - case '0xd07': - return 'cortex-a57' + archInfo; case '0xd08': return 'cortex-a72' + archInfo; case '0xd0b': diff --git a/demo/nodejs/yarn.lock b/demo/nodejs/yarn.lock index 61feecff..542d1a4f 100644 --- a/demo/nodejs/yarn.lock +++ b/demo/nodejs/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@picovoice/orca-node@=0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@picovoice/orca-node/-/orca-node-0.2.1.tgz#74f632c37f27e5f426739c6840e8f8b4db5ec135" - integrity sha512-GxxC16V4c3toEG7sNZUMIQtABUjNbNbMwZOxYXAYJ7NuFZ8U2pBkyesYvZ2GP/GefEERcHDpWcpxua+YeagSJQ== +"@picovoice/orca-node@=1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@picovoice/orca-node/-/orca-node-1.0.0.tgz#812728c3183a914eff6b3189dfa958ef4d44f2f7" + integrity sha512-YDTqJ5KsueBC4Nj0Zo287VF+/y7SRjXbOyHy8h66joJYPF0QNsz8oDCzbQO7hzymNbkFXd0crMPK+gQElvd83w== "@picovoice/pvspeaker-node@^1.0.0": version "1.0.0" diff --git a/demo/python/orca_demo_streaming.py b/demo/python/orca_demo_streaming.py index 5791f9f3..830cff3f 100644 --- a/demo/python/orca_demo_streaming.py +++ b/demo/python/orca_demo_streaming.py @@ -27,7 +27,11 @@ import pvorca import tiktoken -from pvorca import Orca, OrcaActivationLimitError, OrcaInvalidArgumentError +from pvorca import ( + Orca, + OrcaActivationLimitError, + OrcaInvalidArgumentError, +) from pvspeaker import PvSpeaker CUSTOM_PRON_PATTERN = r"\{(.*?\|.*?)\}" @@ -53,8 +57,6 @@ def linux_machine() -> str: if "0xd03" == cpu_part: return "cortex-a53" + arch_info - elif "0xd07" == cpu_part: - return "cortex-a57" + arch_info elif "0xd08" == cpu_part: return "cortex-a72" + arch_info elif "0xd0b" == cpu_part: diff --git a/demo/python/requirements.txt b/demo/python/requirements.txt index e0df0681..c73a4ac1 100644 --- a/demo/python/requirements.txt +++ b/demo/python/requirements.txt @@ -1,4 +1,4 @@ numpy>=1.24.0 -pvorca==0.2.4 +pvorca==1.0.0 pvspeaker==1.0.2 tiktoken==0.6.0 diff --git a/demo/python/setup.py b/demo/python/setup.py index 73456e2f..85983b93 100644 --- a/demo/python/setup.py +++ b/demo/python/setup.py @@ -26,7 +26,7 @@ setuptools.setup( name="pvorcademo", - version="0.2.5", + version="1.0.0", author="Picovoice", author_email="hello@picovoice.ai", description="Orca Streaming Text-to-Speech Engine demos", @@ -34,7 +34,7 @@ long_description_content_type="text/markdown", url="https://github.com/Picovoice/orca", packages=["pvorcademo"], - install_requires=["numpy>=1.24.0", "pvorca==0.2.4", "pvspeaker==1.0.2", "tiktoken==0.6.0"], + install_requires=["numpy>=1.24.0", "pvorca==1.0.0", "pvspeaker==1.0.2", "tiktoken==0.6.0"], include_package_data=True, classifiers=[ "Development Status :: 4 - Beta", diff --git a/demo/web/index.html b/demo/web/index.html index ff3dfaed..5a95a2cf 100644 --- a/demo/web/index.html +++ b/demo/web/index.html @@ -228,16 +228,19 @@ }); // Streaming Synthesis - let isPlayingStream = false; + let isPlayingAudio = false; + let isStreaming = false; const audioBuffer = []; let streamSource; - async function playStream() { - if (isPlayingStream) return; + function playStream() { + if (isPlayingAudio) return; if (audioBuffer.length === 0) { - streamPlayBtnEl.disabled = false; - streamCloseBtnEl.disabled = false; + if (!isStreaming) { + streamPlayBtnEl.disabled = false; + streamCloseBtnEl.disabled = false; + } return; } else { streamPlayBtnEl.disabled = true; @@ -250,12 +253,12 @@ streamSource.connect(originalAudioGain); streamSource.onended = async () => { - isPlayingStream = false; - await playStream(); + isPlayingAudio = false; + playStream(); }; streamSource.start(); - isPlayingStream = true; + isPlayingAudio = true; } async function streamOpen() { @@ -282,6 +285,7 @@ async function streamPlay() { writeMessage('Synthesizing and playing speech! Please listen for audio.'); try { + isStreaming = true; streamTextDisplayEl.innerText = ''; streamSecondsDisplayEl.innerText = '0'; @@ -298,8 +302,8 @@ const time = curSecs + newSecs; streamSecondsDisplayEl.innerText = time.toFixed(3); audioBuffer.push(createBuffer(wordPcm)); - if (numIterations === 1) { - await playStream(); + if (numIterations === 1 || !isPlayingAudio) { + playStream(); } numIterations++; } @@ -313,10 +317,12 @@ const time = curSecs + newSecs; streamSecondsDisplayEl.innerText = time.toFixed(3); audioBuffer.push(createBuffer(flushPcm)); - await playStream(); + playStream(); } } catch (err) { writeMessage(err); + } finally { + isStreaming = false; } } diff --git a/demo/web/package.json b/demo/web/package.json index 75668e0e..46d6a08a 100644 --- a/demo/web/package.json +++ b/demo/web/package.json @@ -1,6 +1,6 @@ { "name": "orca-web-demo", - "version": "0.2.0", + "version": "1.0.0", "description": "A basic demo to show how to use Orca for web browsers, using the IIFE version of the library", "main": "index.js", "private": true, @@ -18,7 +18,7 @@ "author": "Picovoice Inc", "license": "Apache-2.0", "dependencies": { - "@picovoice/orca-web": "~0.2.1" + "@picovoice/orca-web": "~1.0.0" }, "devDependencies": { "http-server": "^14.0.0" diff --git a/demo/web/yarn.lock b/demo/web/yarn.lock index e9a4dae5..038ab663 100644 --- a/demo/web/yarn.lock +++ b/demo/web/yarn.lock @@ -2,17 +2,17 @@ # yarn lockfile v1 -"@picovoice/orca-web@~0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@picovoice/orca-web/-/orca-web-0.2.1.tgz#7f2a3fea9eb33f834a00fa843b20ae6f4df4a3e2" - integrity sha512-yPPLZK2SBeR8TYI/h9gwbhOPShOW/VqQPPagQLt4ikKADDsU1WLslZ49d8kGqsd1ECeLith/xDAjIE4BFAiv8Q== +"@picovoice/orca-web@~1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@picovoice/orca-web/-/orca-web-1.0.0.tgz#2a9d228d347aab095cb94934031b9dee4bc90a4b" + integrity sha512-3Mj4ZG4uz28q8nRyRGwmUlTdZH0O501Z1SCu5jYosteewtiP6s0QHQxbZntG2NN58kVIayohTl61fViuFz8W4w== dependencies: - "@picovoice/web-utils" "=1.3.4" + "@picovoice/web-utils" "=1.4.2" -"@picovoice/web-utils@=1.3.4": - version "1.3.4" - resolved "https://registry.yarnpkg.com/@picovoice/web-utils/-/web-utils-1.3.4.tgz#de3c4afe39aaf6e620320e413bfdf69bd9921f5d" - integrity sha512-f5bh1jvlbK53EzGdbpbcvNDoz16wbuQ/Fkj+T0GDQulowky+u/HfGZJE7si4vQ/m/2Lctx07X8YxmUHlH2FKGg== +"@picovoice/web-utils@=1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@picovoice/web-utils/-/web-utils-1.4.2.tgz#2ddc44552d15fa1a4958e0c3384e58545255eea1" + integrity sha512-pF5Uw3Vm4mOWJ2H3Zc7E/nDr/O7OhbvgEK6W7cx9MNNK3qq51MqiGluPpZ8a2K61BuIzxcNMC1mXWpmIAWVolA== dependencies: commander "^10.0.1" diff --git a/lib/android/arm64-v8a/libpv_orca.so b/lib/android/arm64-v8a/libpv_orca.so index c705a0eb..8ffa112b 100755 Binary files a/lib/android/arm64-v8a/libpv_orca.so and b/lib/android/arm64-v8a/libpv_orca.so differ diff --git a/lib/android/armeabi-v7a/libpv_orca.so b/lib/android/armeabi-v7a/libpv_orca.so index 65a4b1a9..a5eb6891 100755 Binary files a/lib/android/armeabi-v7a/libpv_orca.so and b/lib/android/armeabi-v7a/libpv_orca.so differ diff --git a/lib/android/x86/libpv_orca.so b/lib/android/x86/libpv_orca.so index 2117fffc..0b73f76b 100755 Binary files a/lib/android/x86/libpv_orca.so and b/lib/android/x86/libpv_orca.so differ diff --git a/lib/android/x86_64/libpv_orca.so b/lib/android/x86_64/libpv_orca.so index 051570fb..8ab364c7 100755 Binary files a/lib/android/x86_64/libpv_orca.so and b/lib/android/x86_64/libpv_orca.so differ diff --git a/lib/common/orca_params_female.pv b/lib/common/orca_params_female.pv index 674f9f54..0080bb25 100644 Binary files a/lib/common/orca_params_female.pv and b/lib/common/orca_params_female.pv differ diff --git a/lib/common/orca_params_male.pv b/lib/common/orca_params_male.pv index 8262b8f8..84393658 100644 Binary files a/lib/common/orca_params_male.pv and b/lib/common/orca_params_male.pv differ diff --git a/lib/ios/PvOrca.xcframework/Info.plist b/lib/ios/PvOrca.xcframework/Info.plist index ef4eadaa..11d0a439 100644 --- a/lib/ios/PvOrca.xcframework/Info.plist +++ b/lib/ios/PvOrca.xcframework/Info.plist @@ -5,6 +5,8 @@ AvailableLibraries + BinaryPath + PvOrca.framework/PvOrca LibraryIdentifier ios-arm64_x86_64-simulator LibraryPath @@ -20,6 +22,8 @@ simulator + BinaryPath + PvOrca.framework/PvOrca LibraryIdentifier ios-arm64 LibraryPath diff --git a/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/Info.plist b/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/Info.plist index 82b0263d..b1601e2f 100644 Binary files a/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/Info.plist and b/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/Info.plist differ diff --git a/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/PvOrca b/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/PvOrca index 946115cd..31ba32b1 100755 Binary files a/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/PvOrca and b/lib/ios/PvOrca.xcframework/ios-arm64/PvOrca.framework/PvOrca differ diff --git a/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/Info.plist b/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/Info.plist index 1ae31c30..0e1cfcbe 100644 Binary files a/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/Info.plist and b/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/Info.plist differ diff --git a/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/PvOrca b/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/PvOrca index 88351698..56f17179 100755 Binary files a/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/PvOrca and b/lib/ios/PvOrca.xcframework/ios-arm64_x86_64-simulator/PvOrca.framework/PvOrca differ diff --git a/lib/java/linux/x86_64/libpv_orca_jni.so b/lib/java/linux/x86_64/libpv_orca_jni.so index 00b3dc62..4bb97a3d 100755 Binary files a/lib/java/linux/x86_64/libpv_orca_jni.so and b/lib/java/linux/x86_64/libpv_orca_jni.so differ diff --git a/lib/java/mac/arm64/libpv_orca_jni.dylib b/lib/java/mac/arm64/libpv_orca_jni.dylib index eec8e034..88a41e16 100755 Binary files a/lib/java/mac/arm64/libpv_orca_jni.dylib and b/lib/java/mac/arm64/libpv_orca_jni.dylib differ diff --git a/lib/java/mac/x86_64/libpv_orca_jni.dylib b/lib/java/mac/x86_64/libpv_orca_jni.dylib index 329c838e..f749ca77 100755 Binary files a/lib/java/mac/x86_64/libpv_orca_jni.dylib and b/lib/java/mac/x86_64/libpv_orca_jni.dylib differ diff --git a/lib/java/raspberry-pi/cortex-a53-aarch64/libpv_orca_jni.so b/lib/java/raspberry-pi/cortex-a53-aarch64/libpv_orca_jni.so index 45ce6436..e50f9957 100755 Binary files a/lib/java/raspberry-pi/cortex-a53-aarch64/libpv_orca_jni.so and b/lib/java/raspberry-pi/cortex-a53-aarch64/libpv_orca_jni.so differ diff --git a/lib/java/raspberry-pi/cortex-a53/libpv_orca_jni.so b/lib/java/raspberry-pi/cortex-a53/libpv_orca_jni.so index 8eb5bf93..b4f0f96b 100755 Binary files a/lib/java/raspberry-pi/cortex-a53/libpv_orca_jni.so and b/lib/java/raspberry-pi/cortex-a53/libpv_orca_jni.so differ diff --git a/lib/java/raspberry-pi/cortex-a72-aarch64/libpv_orca_jni.so b/lib/java/raspberry-pi/cortex-a72-aarch64/libpv_orca_jni.so index 96c9af5f..fd19dd42 100755 Binary files a/lib/java/raspberry-pi/cortex-a72-aarch64/libpv_orca_jni.so and b/lib/java/raspberry-pi/cortex-a72-aarch64/libpv_orca_jni.so differ diff --git a/lib/java/raspberry-pi/cortex-a72/libpv_orca_jni.so b/lib/java/raspberry-pi/cortex-a72/libpv_orca_jni.so index b6e484a7..cdf156fc 100755 Binary files a/lib/java/raspberry-pi/cortex-a72/libpv_orca_jni.so and b/lib/java/raspberry-pi/cortex-a72/libpv_orca_jni.so differ diff --git a/lib/java/raspberry-pi/cortex-a76-aarch64/libpv_orca_jni.so b/lib/java/raspberry-pi/cortex-a76-aarch64/libpv_orca_jni.so index 1922508a..199eaba1 100755 Binary files a/lib/java/raspberry-pi/cortex-a76-aarch64/libpv_orca_jni.so and b/lib/java/raspberry-pi/cortex-a76-aarch64/libpv_orca_jni.so differ diff --git a/lib/java/raspberry-pi/cortex-a76/libpv_orca_jni.so b/lib/java/raspberry-pi/cortex-a76/libpv_orca_jni.so index 5b9f7225..09f54cb5 100755 Binary files a/lib/java/raspberry-pi/cortex-a76/libpv_orca_jni.so and b/lib/java/raspberry-pi/cortex-a76/libpv_orca_jni.so differ diff --git a/lib/java/windows/amd64/pv_orca_jni.dll b/lib/java/windows/amd64/pv_orca_jni.dll index 884c014a..152a635a 100644 Binary files a/lib/java/windows/amd64/pv_orca_jni.dll and b/lib/java/windows/amd64/pv_orca_jni.dll differ diff --git a/lib/linux/x86_64/libpv_orca.so b/lib/linux/x86_64/libpv_orca.so index 1f4ad37e..a3f0a82b 100755 Binary files a/lib/linux/x86_64/libpv_orca.so and b/lib/linux/x86_64/libpv_orca.so differ diff --git a/lib/mac/arm64/libpv_orca.dylib b/lib/mac/arm64/libpv_orca.dylib index 64ffc8a9..1a606ea7 100755 Binary files a/lib/mac/arm64/libpv_orca.dylib and b/lib/mac/arm64/libpv_orca.dylib differ diff --git a/lib/mac/x86_64/libpv_orca.dylib b/lib/mac/x86_64/libpv_orca.dylib index 23205577..628f2857 100755 Binary files a/lib/mac/x86_64/libpv_orca.dylib and b/lib/mac/x86_64/libpv_orca.dylib differ diff --git a/lib/node/linux/x86_64/pv_orca.node b/lib/node/linux/x86_64/pv_orca.node index f3dab1dd..b9c21517 100755 Binary files a/lib/node/linux/x86_64/pv_orca.node and b/lib/node/linux/x86_64/pv_orca.node differ diff --git a/lib/node/mac/arm64/pv_orca.node b/lib/node/mac/arm64/pv_orca.node index 293df42d..8be5ffc4 100755 Binary files a/lib/node/mac/arm64/pv_orca.node and b/lib/node/mac/arm64/pv_orca.node differ diff --git a/lib/node/mac/x86_64/pv_orca.node b/lib/node/mac/x86_64/pv_orca.node index 4f11947e..c0ce6350 100755 Binary files a/lib/node/mac/x86_64/pv_orca.node and b/lib/node/mac/x86_64/pv_orca.node differ diff --git a/lib/node/raspberry-pi/cortex-a53-aarch64/pv_orca.node b/lib/node/raspberry-pi/cortex-a53-aarch64/pv_orca.node index 5ac431a2..a115afa5 100755 Binary files a/lib/node/raspberry-pi/cortex-a53-aarch64/pv_orca.node and b/lib/node/raspberry-pi/cortex-a53-aarch64/pv_orca.node differ diff --git a/lib/node/raspberry-pi/cortex-a53/pv_orca.node b/lib/node/raspberry-pi/cortex-a53/pv_orca.node index d4bd1941..fdb29ea7 100755 Binary files a/lib/node/raspberry-pi/cortex-a53/pv_orca.node and b/lib/node/raspberry-pi/cortex-a53/pv_orca.node differ diff --git a/lib/node/raspberry-pi/cortex-a72-aarch64/pv_orca.node b/lib/node/raspberry-pi/cortex-a72-aarch64/pv_orca.node index d3a7a53e..d6ad2972 100755 Binary files a/lib/node/raspberry-pi/cortex-a72-aarch64/pv_orca.node and b/lib/node/raspberry-pi/cortex-a72-aarch64/pv_orca.node differ diff --git a/lib/node/raspberry-pi/cortex-a72/pv_orca.node b/lib/node/raspberry-pi/cortex-a72/pv_orca.node index 66b68123..4e61c98b 100755 Binary files a/lib/node/raspberry-pi/cortex-a72/pv_orca.node and b/lib/node/raspberry-pi/cortex-a72/pv_orca.node differ diff --git a/lib/node/raspberry-pi/cortex-a76-aarch64/pv_orca.node b/lib/node/raspberry-pi/cortex-a76-aarch64/pv_orca.node index 074ecfc2..2581bf19 100755 Binary files a/lib/node/raspberry-pi/cortex-a76-aarch64/pv_orca.node and b/lib/node/raspberry-pi/cortex-a76-aarch64/pv_orca.node differ diff --git a/lib/node/raspberry-pi/cortex-a76/pv_orca.node b/lib/node/raspberry-pi/cortex-a76/pv_orca.node index d6a2b004..a3311cb4 100755 Binary files a/lib/node/raspberry-pi/cortex-a76/pv_orca.node and b/lib/node/raspberry-pi/cortex-a76/pv_orca.node differ diff --git a/lib/node/windows/amd64/pv_orca.node b/lib/node/windows/amd64/pv_orca.node index 822216a9..c443e9f9 100644 Binary files a/lib/node/windows/amd64/pv_orca.node and b/lib/node/windows/amd64/pv_orca.node differ diff --git a/lib/raspberry-pi/cortex-a53-aarch64/libpv_orca.so b/lib/raspberry-pi/cortex-a53-aarch64/libpv_orca.so index 3860b449..47f03c9a 100755 Binary files a/lib/raspberry-pi/cortex-a53-aarch64/libpv_orca.so and b/lib/raspberry-pi/cortex-a53-aarch64/libpv_orca.so differ diff --git a/lib/raspberry-pi/cortex-a53/libpv_orca.so b/lib/raspberry-pi/cortex-a53/libpv_orca.so index c8037929..00bf39f3 100755 Binary files a/lib/raspberry-pi/cortex-a53/libpv_orca.so and b/lib/raspberry-pi/cortex-a53/libpv_orca.so differ diff --git a/lib/raspberry-pi/cortex-a72-aarch64/libpv_orca.so b/lib/raspberry-pi/cortex-a72-aarch64/libpv_orca.so index 580817e5..3a5049e8 100755 Binary files a/lib/raspberry-pi/cortex-a72-aarch64/libpv_orca.so and b/lib/raspberry-pi/cortex-a72-aarch64/libpv_orca.so differ diff --git a/lib/raspberry-pi/cortex-a72/libpv_orca.so b/lib/raspberry-pi/cortex-a72/libpv_orca.so index eaa0d377..eba99d89 100755 Binary files a/lib/raspberry-pi/cortex-a72/libpv_orca.so and b/lib/raspberry-pi/cortex-a72/libpv_orca.so differ diff --git a/lib/raspberry-pi/cortex-a76-aarch64/libpv_orca.so b/lib/raspberry-pi/cortex-a76-aarch64/libpv_orca.so index 14581b00..b516c960 100755 Binary files a/lib/raspberry-pi/cortex-a76-aarch64/libpv_orca.so and b/lib/raspberry-pi/cortex-a76-aarch64/libpv_orca.so differ diff --git a/lib/raspberry-pi/cortex-a76/libpv_orca.so b/lib/raspberry-pi/cortex-a76/libpv_orca.so index ddda1690..e4e4af4f 100755 Binary files a/lib/raspberry-pi/cortex-a76/libpv_orca.so and b/lib/raspberry-pi/cortex-a76/libpv_orca.so differ diff --git a/lib/wasm/pv_orca.wasm b/lib/wasm/pv_orca.wasm index 6ead9da6..02792799 100755 Binary files a/lib/wasm/pv_orca.wasm and b/lib/wasm/pv_orca.wasm differ diff --git a/lib/wasm/pv_orca_simd.wasm b/lib/wasm/pv_orca_simd.wasm index 4570a773..90bd7dec 100755 Binary files a/lib/wasm/pv_orca_simd.wasm and b/lib/wasm/pv_orca_simd.wasm differ diff --git a/lib/windows/amd64/libpv_orca.dll b/lib/windows/amd64/libpv_orca.dll index 295aa105..840354dd 100644 Binary files a/lib/windows/amd64/libpv_orca.dll and b/lib/windows/amd64/libpv_orca.dll differ diff --git a/resources/.test/test_data.json b/resources/.test/test_data.json index 1832e1fb..947d7bbb 100644 --- a/resources/.test/test_data.json +++ b/resources/.test/test_data.json @@ -26,89 +26,90 @@ { "word": "Test", "start_sec": 0.000, - "end_sec": 0.32, + "end_sec": 0.348, "phonemes": [ { "phoneme": "T", - "start_sec": 0.00, - "end_sec": 0.09 + "start_sec": 0.000, + "end_sec": 0.104 }, { "phoneme": "EH", - "start_sec": 0.093, - "end_sec": 0.19 + "start_sec": 0.104, + "end_sec": 0.197 }, { "phoneme": "S", - "start_sec": 0.19, - "end_sec": 0.25 + "start_sec": 0.197, + "end_sec": 0.279 }, { "phoneme": "T", - "start_sec": 0.25, - "end_sec": 0.32 + "start_sec": 0.279, + "end_sec": 0.348 } ] }, { "word": "alignment", - "start_sec": 0.32, - "end_sec": 0.85, + "start_sec": 0.348, + "end_sec": 0.848, "phonemes": [ { "phoneme": "AH", - "start_sec": 0.32, - "end_sec": 0.37 + "start_sec": 0.348, + "end_sec": 0.406 }, { "phoneme": "L", - "start_sec": 0.37, - "end_sec": 0.44 + "start_sec": 0.406, + "end_sec": 0.488 }, { "phoneme": "AY", - "start_sec": 0.44, - "end_sec": 0.53 + "start_sec": 0.488, + "end_sec": 0.557 }, { "phoneme": "N", - "start_sec": 0.53, - "end_sec": 0.60 + "start_sec": 0.557, + "end_sec": 0.639 }, { "phoneme": "M", - "start_sec": 0.60, - "end_sec": 0.65 + "start_sec": 0.639, + "end_sec": 0.685 }, { "phoneme": "AH", - "start_sec": 0.65, - "end_sec": 0.72 + "start_sec": 0.685, + "end_sec": 0.731 }, { "phoneme": "N", - "start_sec": 0.72, - "end_sec": 0.78 + "start_sec": 0.731, + "end_sec": 0.778 }, { "phoneme": "T", - "start_sec": 0.78, - "end_sec": 0.85 + "start_sec": 0.778, + "end_sec": 0.848 } ] }, { "word": ".", - "start_sec": 0.85, - "end_sec": 0.94, + "start_sec": 0.848, + "end_sec": 0.882, "phonemes": [ { "phoneme": ".", - "start_sec": 0.85, - "end_sec": 0.94 + "start_sec": 0.848, + "end_sec": 0.882 } ] } ], - "audio_data_folder": "resources/.test/wav/" -} + "audio_data_folder": "resources/.test/wav/", + "exact_alignment_test_model_identifier": "orca_params_female" +} \ No newline at end of file diff --git a/resources/.test/wav/orca_params_female_single.wav b/resources/.test/wav/orca_params_female_single.wav index 39ac1f25..13233321 100644 Binary files a/resources/.test/wav/orca_params_female_single.wav and b/resources/.test/wav/orca_params_female_single.wav differ diff --git a/resources/.test/wav/orca_params_female_stream.wav b/resources/.test/wav/orca_params_female_stream.wav index cce1870c..2c485001 100644 Binary files a/resources/.test/wav/orca_params_female_stream.wav and b/resources/.test/wav/orca_params_female_stream.wav differ diff --git a/resources/.test/wav/orca_params_male_single.wav b/resources/.test/wav/orca_params_male_single.wav index 744fc6b7..b938a181 100644 Binary files a/resources/.test/wav/orca_params_male_single.wav and b/resources/.test/wav/orca_params_male_single.wav differ diff --git a/resources/.test/wav/orca_params_male_stream.wav b/resources/.test/wav/orca_params_male_stream.wav index 6941c554..14e1c9d8 100644 Binary files a/resources/.test/wav/orca_params_male_stream.wav and b/resources/.test/wav/orca_params_male_stream.wav differ diff --git a/resources/assets/orca_streaming_animation.gif b/resources/assets/orca_streaming_animation.gif index 87c4187e..18e3f964 100644 Binary files a/resources/assets/orca_streaming_animation.gif and b/resources/assets/orca_streaming_animation.gif differ