Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Dec 2, 2024
1 parent add7a80 commit fec24bd
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 75 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ios-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,20 @@ jobs:
- run:
pip3 install requests

- name: Install Cocoapods
run: gem install cocoapods

- name: Make build dir
run: mkdir ddp

- name: Copy test_resources
run: ./copy_test_resources.sh

- name: Run Cocoapods
run: pod install

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
EagleAppTestUITests/BaseTest.swift

- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace EagleAppTest.xcworkspace
-project EagleAppTest.xcodeproj
-sdk iphoneos
-scheme EagleAppTest
-derivedDataPath ddp
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/ios-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,12 @@ jobs:
- run:
pip3 install requests

- name: Install Cocoapods
run: gem install cocoapods

- name: Make build dir
run: mkdir ddp

- name: Copy test_resources
run: ./copy_test_resources.sh

- name: Run Cocoapods
run: pod install

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
PerformanceTest/PerformanceTest.swift
Expand All @@ -76,7 +70,7 @@ jobs:
- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace EagleAppTest.xcworkspace
-project EagleAppTest.xcodeproj
-sdk iphoneos
-scheme PerformanceTest
-derivedDataPath ddp
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ let package = Package(
"binding/ios/EagleBase.swift",
"binding/ios/EagleErrors.swift",
"binding/ios/EagleProfile.swift",
"binding/ios/EagleProfiler.swift",
"binding/ios/EagleProfiler.swift"
],
resources: [
.copy("lib/common/eagle_params.pv")
]
)
]
)
)
22 changes: 7 additions & 15 deletions binding/ios/EagleAppTest/EagleAppTest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
1E0064D427CEEA66006FF6E9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E0064D227CEEA66006FF6E9 /* LaunchScreen.storyboard */; };
1E00654627CFF260006FF6E9 /* EagleAppTestUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0064E827CEEA66006FF6E9 /* EagleAppTestUITests.swift */; };
1E5B7B042800D9BE00F8BDDB /* PerformanceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E5B7B032800D9BE00F8BDDB /* PerformanceTest.swift */; };
36696536961DE78B3E1C06FA /* (null) in Frameworks */ = {isa = PBXBuildFile; };
36696536961DE78B3E1C06FA /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
C757D8CD28A1C77100F391C8 /* BaseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C757D8CB28A1C77100F391C8 /* BaseTest.swift */; };
C790A6FB2A2012C40074FF7A /* audio_samples in Resources */ = {isa = PBXBuildFile; fileRef = C790A6FA2A2012C40074FF7A /* audio_samples */; };
C790A6FC2A2012C40074FF7A /* audio_samples in Resources */ = {isa = PBXBuildFile; fileRef = C790A6FA2A2012C40074FF7A /* audio_samples */; };
Expand Down Expand Up @@ -71,7 +71,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
36696536961DE78B3E1C06FA /* (null) in Frameworks */,
36696536961DE78B3E1C06FA /* BuildFile in Frameworks */,
E17FFF062CFE3B4300AA5CA9 /* Eagle in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -93,7 +93,6 @@
1E5B7B022800D9A500F8BDDB /* PerformanceTest */,
1E0064C627CEEA65006FF6E9 /* EagleAppTest */,
1E0064E727CEEA66006FF6E9 /* EagleAppTestUITests */,
E17FFF022CFE3B3E00AA5CA9 /* Frameworks */,
1E0064C527CEEA65006FF6E9 /* Products */,
);
sourceTree = "<group>";
Expand Down Expand Up @@ -141,13 +140,6 @@
path = PerformanceTest;
sourceTree = "<group>";
};
E17FFF022CFE3B3E00AA5CA9 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -237,7 +229,7 @@
);
mainGroup = 1E0064BB27CEEA65006FF6E9;
packageReferences = (
E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "../../../../eagle" */,
E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */,
);
productRefGroup = 1E0064C527CEEA65006FF6E9 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -652,7 +644,7 @@
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "../../../../eagle" */ = {
E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../../../eagle;
};
Expand All @@ -661,17 +653,17 @@
/* Begin XCSwiftPackageProductDependency section */
E17FFF032CFE3B3E00AA5CA9 /* Eagle */ = {
isa = XCSwiftPackageProductDependency;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "../../../../eagle" */;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */;
productName = Eagle;
};
E17FFF052CFE3B4300AA5CA9 /* Eagle */ = {
isa = XCSwiftPackageProductDependency;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "../../../../eagle" */;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */;
productName = Eagle;
};
E17FFF072CFE3B4600AA5CA9 /* Eagle */ = {
isa = XCSwiftPackageProductDependency;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "../../../../eagle" */;
package = E17FFF012CFE3B3200AA5CA9 /* XCLocalSwiftPackageReference "eagle" */;
productName = Eagle;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
16 changes: 0 additions & 16 deletions binding/ios/EagleAppTest/Podfile.lock

This file was deleted.

16 changes: 8 additions & 8 deletions demo/ios/EagleDemo/EagleDemo/ViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ViewModel: ObservableObject {
private var testListener: VoiceProcessorFrameListener?
private var errorListener: VoiceProcessorErrorListener?
private var testErrorListener: VoiceProcessorErrorListener?

private var eagleProfiler: EagleProfiler!
private var eagle: Eagle!

Expand Down Expand Up @@ -76,7 +76,7 @@ class ViewModel: ObservableObject {
do {
try eagleProfiler = EagleProfiler(accessKey: accessKey)
statusText = "Please keep speaking until the enrollment percentage reaches 100%"

try createDumpFile(filename: "enroll_dump.pcm")
} catch let error as EagleInvalidArgumentError {
errorMessage = "\(error.localizedDescription)"
Expand All @@ -96,7 +96,7 @@ class ViewModel: ObservableObject {
public func enroll() throws {
state = UIState.ENROLLING
initProfiler()

self.errorListener = VoiceProcessorErrorListener({ error in
self.errorMessage = "\(error)"
})
Expand Down Expand Up @@ -128,7 +128,7 @@ class ViewModel: ObservableObject {
try? self.stopEnroll()
}
})

VoiceProcessor.instance.addErrorListener(self.errorListener!)
VoiceProcessor.instance.addFrameListener(self.frameListener!)

Expand All @@ -147,15 +147,15 @@ class ViewModel: ObservableObject {
private func stopEnroll(export: Bool = false) throws {
VoiceProcessor.instance.removeErrorListener(errorListener!)
VoiceProcessor.instance.removeFrameListener(frameListener!)

if VoiceProcessor.instance.numFrameListeners == 0 {
do {
try VoiceProcessor.instance.stop()
} catch {
throw EagleError(error.localizedDescription)
}
}

if export == true {
let newProfile = try eagleProfiler.export()
DispatchQueue.main.async {
Expand Down Expand Up @@ -199,7 +199,7 @@ class ViewModel: ObservableObject {
try? self.stopTest()
}
})

try createDumpFile(filename: "test_dump.pcm")
} catch let error as EagleInvalidArgumentError {
errorMessage = "\(error.localizedDescription)"
Expand Down Expand Up @@ -243,7 +243,7 @@ class ViewModel: ObservableObject {
throw EagleError(error.localizedDescription)
}
}

if eagle != nil {
eagle.delete()
eagle = nil
Expand Down
20 changes: 0 additions & 20 deletions demo/ios/EagleDemo/Podfile.lock

This file was deleted.

1 change: 1 addition & 0 deletions resources/.lint/spell-check/dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ wavefile
wchars
wfopen
xcframework
xcodeproj
xcuitest
xcworkspace
malloc
Expand Down

0 comments on commit fec24bd

Please sign in to comment.