Skip to content

Commit 11a1fab

Browse files
Use remote models for test (#324)
* Use remote model in unit tests * Use bundle for class when passed in for tests * Fix merge for example app * Fix warnings and remove explicit cpu compute unit
1 parent 9d026b1 commit 11a1fab

File tree

4 files changed

+156
-150
lines changed

4 files changed

+156
-150
lines changed

Examples/WhisperAX/WhisperAX.xcodeproj/project.pbxproj

Lines changed: 74 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,23 @@
88

99
/* Begin PBXBuildFile section */
1010
161136102B3F6C68003C20F6 /* WhisperKit in Frameworks */ = {isa = PBXBuildFile; productRef = 1611360F2B3F6C68003C20F6 /* WhisperKit */; };
11-
164F15AF2C91A51D00C715CB /* DistanceCalculation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 164F15AE2C91A51D00C715CB /* DistanceCalculation.swift */; };
12-
16548D3A2C7BB90B002BAE86 /* NormalizeEn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16548D292C7BB90B002BAE86 /* NormalizeEn.swift */; };
13-
16548D3B2C7BB90B002BAE86 /* SpellingMapping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16548D2A2C7BB90B002BAE86 /* SpellingMapping.swift */; };
14-
16548D3C2C7BB90B002BAE86 /* WERUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16548D2B2C7BB90B002BAE86 /* WERUtils.swift */; };
15-
16548D3D2C7BB90B002BAE86 /* es_test_clip.wav in Resources */ = {isa = PBXBuildFile; fileRef = 16548D2D2C7BB90B002BAE86 /* es_test_clip.wav */; };
16-
16548D3E2C7BB90B002BAE86 /* ja_test_clip.wav in Resources */ = {isa = PBXBuildFile; fileRef = 16548D2E2C7BB90B002BAE86 /* ja_test_clip.wav */; };
17-
16548D3F2C7BB90B002BAE86 /* jfk_441khz.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 16548D2F2C7BB90B002BAE86 /* jfk_441khz.m4a */; };
18-
16548D402C7BB90B002BAE86 /* jfk.wav in Resources */ = {isa = PBXBuildFile; fileRef = 16548D302C7BB90B002BAE86 /* jfk.wav */; };
19-
16548D412C7BB90B002BAE86 /* ted_60.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 16548D312C7BB90B002BAE86 /* ted_60.m4a */; };
20-
16548D432C7BB90B002BAE86 /* RegressionTestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16548D342C7BB90B002BAE86 /* RegressionTestUtils.swift */; };
21-
16548D442C7BB90B002BAE86 /* RegressionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16548D352C7BB90B002BAE86 /* RegressionTests.swift */; };
22-
16548D452C7BB90B002BAE86 /* TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16548D362C7BB90B002BAE86 /* TestUtils.swift */; };
11+
162514CE2DAE39250037301E /* SpellingMapping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514BC2DAE39250037301E /* SpellingMapping.swift */; };
12+
162514CF2DAE39250037301E /* DistanceCalculation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514BA2DAE39250037301E /* DistanceCalculation.swift */; };
13+
162514D02DAE39250037301E /* FunctionalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514C82DAE39250037301E /* FunctionalTests.swift */; };
14+
162514D12DAE39250037301E /* TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514CB2DAE39250037301E /* TestUtils.swift */; };
15+
162514D22DAE39250037301E /* WERUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514BD2DAE39250037301E /* WERUtils.swift */; };
16+
162514D32DAE39250037301E /* NormalizeEn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514BB2DAE39250037301E /* NormalizeEn.swift */; };
17+
162514D42DAE39250037301E /* RegressionTestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514CA2DAE39250037301E /* RegressionTestUtils.swift */; };
18+
162514D52DAE39250037301E /* UnitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514CC2DAE39250037301E /* UnitTests.swift */; };
19+
162514D62DAE39250037301E /* RegressionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162514C92DAE39250037301E /* RegressionTests.swift */; };
20+
162514D72DAE39250037301E /* es_test_clip.wav in Resources */ = {isa = PBXBuildFile; fileRef = 162514C22DAE39250037301E /* es_test_clip.wav */; };
21+
162514D82DAE39250037301E /* ja_test_clip.wav in Resources */ = {isa = PBXBuildFile; fileRef = 162514C32DAE39250037301E /* ja_test_clip.wav */; };
22+
162514D92DAE39250037301E /* ted_60.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 162514C62DAE39250037301E /* ted_60.m4a */; };
23+
162514DA2DAE39250037301E /* 8_Channel_ID.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 162514BF2DAE39250037301E /* 8_Channel_ID.m4a */; };
24+
162514DB2DAE39250037301E /* config-v02.json in Resources */ = {isa = PBXBuildFile; fileRef = 162514C02DAE39250037301E /* config-v02.json */; };
25+
162514DC2DAE39250037301E /* jfk_441khz.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 162514C52DAE39250037301E /* jfk_441khz.m4a */; };
26+
162514DD2DAE39250037301E /* config-v03.json in Resources */ = {isa = PBXBuildFile; fileRef = 162514C12DAE39250037301E /* config-v03.json */; };
27+
162514DE2DAE39250037301E /* jfk.wav in Resources */ = {isa = PBXBuildFile; fileRef = 162514C42DAE39250037301E /* jfk.wav */; };
2328
1677AFC22B57618A008C61C0 /* WhisperAXApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1677AFAB2B57618A008C61C0 /* WhisperAXApp.swift */; };
2429
1677AFC42B57618A008C61C0 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1677AFAE2B57618A008C61C0 /* Preview Assets.xcassets */; };
2530
1677AFC92B57618A008C61C0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1677AFB42B57618A008C61C0 /* Assets.xcassets */; };
@@ -96,19 +101,24 @@
96101
161135DE2B3F66DA003C20F6 /* WhisperAX Watch App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "WhisperAX Watch App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
97102
161135F02B3F66DC003C20F6 /* WhisperAX Watch AppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "WhisperAX Watch AppTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
98103
161135FA2B3F66DC003C20F6 /* WhisperAX Watch AppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "WhisperAX Watch AppUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
104+
162514BA2DAE39250037301E /* DistanceCalculation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DistanceCalculation.swift; sourceTree = "<group>"; };
105+
162514BB2DAE39250037301E /* NormalizeEn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NormalizeEn.swift; sourceTree = "<group>"; };
106+
162514BC2DAE39250037301E /* SpellingMapping.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpellingMapping.swift; sourceTree = "<group>"; };
107+
162514BD2DAE39250037301E /* WERUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WERUtils.swift; sourceTree = "<group>"; };
108+
162514BF2DAE39250037301E /* 8_Channel_ID.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = 8_Channel_ID.m4a; sourceTree = "<group>"; };
109+
162514C02DAE39250037301E /* config-v02.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "config-v02.json"; sourceTree = "<group>"; };
110+
162514C12DAE39250037301E /* config-v03.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "config-v03.json"; sourceTree = "<group>"; };
111+
162514C22DAE39250037301E /* es_test_clip.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = es_test_clip.wav; sourceTree = "<group>"; };
112+
162514C32DAE39250037301E /* ja_test_clip.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = ja_test_clip.wav; sourceTree = "<group>"; };
113+
162514C42DAE39250037301E /* jfk.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = jfk.wav; sourceTree = "<group>"; };
114+
162514C52DAE39250037301E /* jfk_441khz.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = jfk_441khz.m4a; sourceTree = "<group>"; };
115+
162514C62DAE39250037301E /* ted_60.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = ted_60.m4a; sourceTree = "<group>"; };
116+
162514C82DAE39250037301E /* FunctionalTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FunctionalTests.swift; sourceTree = "<group>"; };
117+
162514C92DAE39250037301E /* RegressionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegressionTests.swift; sourceTree = "<group>"; };
118+
162514CA2DAE39250037301E /* RegressionTestUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegressionTestUtils.swift; sourceTree = "<group>"; };
119+
162514CB2DAE39250037301E /* TestUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestUtils.swift; sourceTree = "<group>"; };
120+
162514CC2DAE39250037301E /* UnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnitTests.swift; sourceTree = "<group>"; };
99121
1626683A2BB90CC9008F950A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
100-
164F15AE2C91A51D00C715CB /* DistanceCalculation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DistanceCalculation.swift; sourceTree = "<group>"; };
101-
16548D292C7BB90B002BAE86 /* NormalizeEn.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NormalizeEn.swift; sourceTree = "<group>"; };
102-
16548D2A2C7BB90B002BAE86 /* SpellingMapping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpellingMapping.swift; sourceTree = "<group>"; };
103-
16548D2B2C7BB90B002BAE86 /* WERUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WERUtils.swift; sourceTree = "<group>"; };
104-
16548D2D2C7BB90B002BAE86 /* es_test_clip.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = es_test_clip.wav; sourceTree = "<group>"; };
105-
16548D2E2C7BB90B002BAE86 /* ja_test_clip.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = ja_test_clip.wav; sourceTree = "<group>"; };
106-
16548D2F2C7BB90B002BAE86 /* jfk_441khz.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = jfk_441khz.m4a; sourceTree = "<group>"; };
107-
16548D302C7BB90B002BAE86 /* jfk.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = jfk.wav; sourceTree = "<group>"; };
108-
16548D312C7BB90B002BAE86 /* ted_60.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = ted_60.m4a; sourceTree = "<group>"; };
109-
16548D342C7BB90B002BAE86 /* RegressionTestUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegressionTestUtils.swift; sourceTree = "<group>"; };
110-
16548D352C7BB90B002BAE86 /* RegressionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegressionTests.swift; sourceTree = "<group>"; };
111-
16548D362C7BB90B002BAE86 /* TestUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestUtils.swift; sourceTree = "<group>"; };
112122
1677AFA62B57618A008C61C0 /* WhisperAX_Watch_AppUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhisperAX_Watch_AppUITests.swift; sourceTree = "<group>"; };
113123
1677AFA72B57618A008C61C0 /* WhisperAX_Watch_AppUITestsLaunchTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhisperAX_Watch_AppUITestsLaunchTests.swift; sourceTree = "<group>"; };
114124
1677AFA92B57618A008C61C0 /* WhisperAX.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = WhisperAX.entitlements; sourceTree = "<group>"; };
@@ -178,37 +188,42 @@
178188
/* End PBXFrameworksBuildPhase section */
179189

180190
/* Begin PBXGroup section */
181-
16548D2C2C7BB90B002BAE86 /* Evaluate */ = {
191+
162514BE2DAE39250037301E /* Evaluate */ = {
182192
isa = PBXGroup;
183193
children = (
184-
164F15AE2C91A51D00C715CB /* DistanceCalculation.swift */,
185-
16548D292C7BB90B002BAE86 /* NormalizeEn.swift */,
186-
16548D2A2C7BB90B002BAE86 /* SpellingMapping.swift */,
187-
16548D2B2C7BB90B002BAE86 /* WERUtils.swift */,
194+
162514BA2DAE39250037301E /* DistanceCalculation.swift */,
195+
162514BB2DAE39250037301E /* NormalizeEn.swift */,
196+
162514BC2DAE39250037301E /* SpellingMapping.swift */,
197+
162514BD2DAE39250037301E /* WERUtils.swift */,
188198
);
189199
path = Evaluate;
190200
sourceTree = "<group>";
191201
};
192-
16548D322C7BB90B002BAE86 /* Resources */ = {
202+
162514C72DAE39250037301E /* Resources */ = {
193203
isa = PBXGroup;
194204
children = (
195-
16548D2D2C7BB90B002BAE86 /* es_test_clip.wav */,
196-
16548D2E2C7BB90B002BAE86 /* ja_test_clip.wav */,
197-
16548D2F2C7BB90B002BAE86 /* jfk_441khz.m4a */,
198-
16548D302C7BB90B002BAE86 /* jfk.wav */,
199-
16548D312C7BB90B002BAE86 /* ted_60.m4a */,
205+
162514BF2DAE39250037301E /* 8_Channel_ID.m4a */,
206+
162514C02DAE39250037301E /* config-v02.json */,
207+
162514C12DAE39250037301E /* config-v03.json */,
208+
162514C22DAE39250037301E /* es_test_clip.wav */,
209+
162514C32DAE39250037301E /* ja_test_clip.wav */,
210+
162514C42DAE39250037301E /* jfk.wav */,
211+
162514C52DAE39250037301E /* jfk_441khz.m4a */,
212+
162514C62DAE39250037301E /* ted_60.m4a */,
200213
);
201214
path = Resources;
202215
sourceTree = "<group>";
203216
};
204-
16548D382C7BB90B002BAE86 /* WhisperKitTests */ = {
217+
162514CD2DAE39250037301E /* WhisperKitTests */ = {
205218
isa = PBXGroup;
206219
children = (
207-
16548D2C2C7BB90B002BAE86 /* Evaluate */,
208-
16548D322C7BB90B002BAE86 /* Resources */,
209-
16548D352C7BB90B002BAE86 /* RegressionTests.swift */,
210-
16548D342C7BB90B002BAE86 /* RegressionTestUtils.swift */,
211-
16548D362C7BB90B002BAE86 /* TestUtils.swift */,
220+
162514BE2DAE39250037301E /* Evaluate */,
221+
162514C72DAE39250037301E /* Resources */,
222+
162514C82DAE39250037301E /* FunctionalTests.swift */,
223+
162514C92DAE39250037301E /* RegressionTests.swift */,
224+
162514CA2DAE39250037301E /* RegressionTestUtils.swift */,
225+
162514CB2DAE39250037301E /* TestUtils.swift */,
226+
162514CC2DAE39250037301E /* UnitTests.swift */,
212227
);
213228
path = WhisperKitTests;
214229
sourceTree = "<group>";
@@ -274,7 +289,7 @@
274289
isa = PBXGroup;
275290
children = (
276291
1677AFBC2B57618A008C61C0 /* WhisperAXTests.swift */,
277-
16548D382C7BB90B002BAE86 /* WhisperKitTests */,
292+
162514CD2DAE39250037301E /* WhisperKitTests */,
278293
);
279294
path = WhisperAXTests;
280295
sourceTree = "<group>";
@@ -555,11 +570,14 @@
555570
isa = PBXResourcesBuildPhase;
556571
buildActionMask = 2147483647;
557572
files = (
558-
16548D3D2C7BB90B002BAE86 /* es_test_clip.wav in Resources */,
559-
16548D3E2C7BB90B002BAE86 /* ja_test_clip.wav in Resources */,
560-
16548D402C7BB90B002BAE86 /* jfk.wav in Resources */,
561-
16548D3F2C7BB90B002BAE86 /* jfk_441khz.m4a in Resources */,
562-
16548D412C7BB90B002BAE86 /* ted_60.m4a in Resources */,
573+
162514D72DAE39250037301E /* es_test_clip.wav in Resources */,
574+
162514D82DAE39250037301E /* ja_test_clip.wav in Resources */,
575+
162514D92DAE39250037301E /* ted_60.m4a in Resources */,
576+
162514DA2DAE39250037301E /* 8_Channel_ID.m4a in Resources */,
577+
162514DB2DAE39250037301E /* config-v02.json in Resources */,
578+
162514DC2DAE39250037301E /* jfk_441khz.m4a in Resources */,
579+
162514DD2DAE39250037301E /* config-v03.json in Resources */,
580+
162514DE2DAE39250037301E /* jfk.wav in Resources */,
563581
);
564582
runOnlyForDeploymentPostprocessing = 0;
565583
};
@@ -612,15 +630,17 @@
612630
isa = PBXSourcesBuildPhase;
613631
buildActionMask = 2147483647;
614632
files = (
615-
16548D3A2C7BB90B002BAE86 /* NormalizeEn.swift in Sources */,
616-
16548D3B2C7BB90B002BAE86 /* SpellingMapping.swift in Sources */,
617-
16548D432C7BB90B002BAE86 /* RegressionTestUtils.swift in Sources */,
618-
16548D452C7BB90B002BAE86 /* TestUtils.swift in Sources */,
619633
1677AFDA2B5763BA008C61C0 /* WhisperAXUITestsLaunchTests.swift in Sources */,
620634
1677AFDC2B5763C0008C61C0 /* WhisperAXTests.swift in Sources */,
621-
164F15AF2C91A51D00C715CB /* DistanceCalculation.swift in Sources */,
622-
16548D3C2C7BB90B002BAE86 /* WERUtils.swift in Sources */,
623-
16548D442C7BB90B002BAE86 /* RegressionTests.swift in Sources */,
635+
162514CE2DAE39250037301E /* SpellingMapping.swift in Sources */,
636+
162514CF2DAE39250037301E /* DistanceCalculation.swift in Sources */,
637+
162514D02DAE39250037301E /* FunctionalTests.swift in Sources */,
638+
162514D12DAE39250037301E /* TestUtils.swift in Sources */,
639+
162514D22DAE39250037301E /* WERUtils.swift in Sources */,
640+
162514D32DAE39250037301E /* NormalizeEn.swift in Sources */,
641+
162514D42DAE39250037301E /* RegressionTestUtils.swift in Sources */,
642+
162514D52DAE39250037301E /* UnitTests.swift in Sources */,
643+
162514D62DAE39250037301E /* RegressionTests.swift in Sources */,
624644
);
625645
runOnlyForDeploymentPostprocessing = 0;
626646
};

0 commit comments

Comments
 (0)