diff --git a/binding/ios/KoalaAppTest/KoalaAppTestUITests/KoalaAppTestUITests.swift b/binding/ios/KoalaAppTest/KoalaAppTestUITests/KoalaAppTestUITests.swift index 202f165..3991fe7 100644 --- a/binding/ios/KoalaAppTest/KoalaAppTestUITests/KoalaAppTestUITests.swift +++ b/binding/ios/KoalaAppTest/KoalaAppTestUITests/KoalaAppTestUITests.swift @@ -155,4 +155,19 @@ class KoalaDemoUITests: XCTestCase { XCTAssert("\(error.localizedDescription)".count == first_error.count) } } + + func testProcessMessageStack() throws { + let k = try Koala.init(accessKey: accessKey) + k.delete() + + var testPcm: [Int16] = [] + testPcm.reserveCapacity(Int(Koala.frameLength)) + + do { + let res = try k.process(testPcm) + XCTAssert(res.count == 0) + } catch { + XCTAssert("\(error.localizedDescription)".count > 0) + } + } } diff --git a/binding/ios/KoalaAppTest/Podfile b/binding/ios/KoalaAppTest/Podfile index b8b8929..a8b76e5 100644 --- a/binding/ios/KoalaAppTest/Podfile +++ b/binding/ios/KoalaAppTest/Podfile @@ -2,13 +2,13 @@ source 'https://cdn.cocoapods.org/' platform :ios, '11.0' target 'KoalaAppTest' do - pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec' + pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec' end target 'KoalaAppTestUITests' do - pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec' + pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec' end target 'PerformanceTest' do - pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec' + pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec' end diff --git a/binding/ios/KoalaAppTest/Podfile.lock b/binding/ios/KoalaAppTest/Podfile.lock index debc9fb..382425f 100644 --- a/binding/ios/KoalaAppTest/Podfile.lock +++ b/binding/ios/KoalaAppTest/Podfile.lock @@ -2,11 +2,11 @@ PODS: - Koala-iOS (2.0.0) DEPENDENCIES: - - Koala-iOS (from `https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec`) + - Koala-iOS (from `https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec`) EXTERNAL SOURCES: Koala-iOS: - :podspec: https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec + :podspec: https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec CHECKOUT OPTIONS: Koala-iOS: @@ -14,8 +14,8 @@ CHECKOUT OPTIONS: :git: https://github.com/Picovoice/koala.git SPEC CHECKSUMS: - Koala-iOS: 865994d8e18b03854f2b933ec9645915ba95f189 + Koala-iOS: c5190ec400b672d5a363593e224732bdb7cd3afb -PODFILE CHECKSUM: aa02120478c1d3dd9e8085db3379479143edbc02 +PODFILE CHECKSUM: 41b47c56686d6916c5128d756c487b9b3f25767c COCOAPODS: 1.11.3 diff --git a/binding/python/test_koala.py b/binding/python/test_koala.py index b27b082..2c2224d 100644 --- a/binding/python/test_koala.py +++ b/binding/python/test_koala.py @@ -137,6 +137,28 @@ def test_message_stack(self): self.assertEqual(len(error), len(e.message_stack)) self.assertListEqual(list(error), list(e.message_stack)) + def test_process_message_stack(self): + relative_path = '../..' + + k = Koala( + access_key=self.access_key, + model_path=default_model_path(relative_path), + library_path=default_library_path(relative_path)) + + test_pcm = [0] * k.frame_length + + address = k._handle + k._handle = None + + try: + res = k.process(test_pcm) + self.assertEqual(len(res), 0) + except KoalaError as e: + self.assertGreater(len(e.message_stack), 0) + self.assertLess(len(e.message_stack), 8) + + k._handle = address + if __name__ == '__main__': parser = argparse.ArgumentParser() diff --git a/demo/ios/KoalaDemo/Podfile b/demo/ios/KoalaDemo/Podfile index a57fb46..705cea4 100644 --- a/demo/ios/KoalaDemo/Podfile +++ b/demo/ios/KoalaDemo/Podfile @@ -2,6 +2,6 @@ source 'https://cdn.cocoapods.org/' platform :ios, '11.0' target 'KoalaDemo' do - pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec' + pod 'Koala-iOS', :podspec => 'https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec' pod 'ios-voice-processor', '~> 1.1.0' end diff --git a/demo/ios/KoalaDemo/Podfile.lock b/demo/ios/KoalaDemo/Podfile.lock index d168322..bcec58a 100644 --- a/demo/ios/KoalaDemo/Podfile.lock +++ b/demo/ios/KoalaDemo/Podfile.lock @@ -4,7 +4,7 @@ PODS: DEPENDENCIES: - ios-voice-processor (~> 1.1.0) - - Koala-iOS (from `https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec`) + - Koala-iOS (from `https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec`) SPEC REPOS: trunk: @@ -12,7 +12,7 @@ SPEC REPOS: EXTERNAL SOURCES: Koala-iOS: - :podspec: https://raw.githubusercontent.com/Picovoice/koala/v2.0-ios/binding/ios/Koala-iOS.podspec + :podspec: https://raw.githubusercontent.com/Picovoice/koala/v2.0/binding/ios/Koala-iOS.podspec CHECKOUT OPTIONS: Koala-iOS: @@ -21,8 +21,8 @@ CHECKOUT OPTIONS: SPEC CHECKSUMS: ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1 - Koala-iOS: 865994d8e18b03854f2b933ec9645915ba95f189 + Koala-iOS: c5190ec400b672d5a363593e224732bdb7cd3afb -PODFILE CHECKSUM: 0f89a64b9647d42bf16b4915aa88de8d933489b8 +PODFILE CHECKSUM: 65beadb4e5a0c4d4e33a9c747318d401315106c2 COCOAPODS: 1.11.3