Skip to content

Commit 08aea4d

Browse files
Merge pull request #16 from DevCrew-io/feat/audio-sample-project
feat: add audio translation and transcription in sample project
2 parents c56dd20 + d741fb5 commit 08aea4d

File tree

17 files changed

+281
-78
lines changed

17 files changed

+281
-78
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [1.0.3] - 07-04-2023
10+
11+
### Added
12+
- Audio translation & transcription.
13+
14+
### Changed
15+
- Update readme file.
16+
- Update example project with audio translation & transcription.
17+
918
## [1.0.2] - 06-23-2023
1019

1120
### Changed

Example/Example.xcodeproj/project.pbxproj

+36-31
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
777D472B2A53EA9D0050C0E7 /* ChatGPTAPIManager in Frameworks */ = {isa = PBXBuildFile; productRef = 777D472A2A53EA9D0050C0E7 /* ChatGPTAPIManager */; };
11+
777D472F2A53F7560050C0E7 /* english_song.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 777D472D2A53F7550050C0E7 /* english_song.m4a */; };
12+
777D47302A53F7560050C0E7 /* translation_file.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 777D472E2A53F7550050C0E7 /* translation_file.m4a */; };
13+
777D47322A5419150050C0E7 /* AudioViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 777D47312A5419150050C0E7 /* AudioViewModel.swift */; };
1014
A8B85FCD2A431318005FBEDE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B85FCC2A431318005FBEDE /* AppDelegate.swift */; };
1115
A8B85FCF2A431318005FBEDE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B85FCE2A431318005FBEDE /* SceneDelegate.swift */; };
1216
A8B85FD12A431318005FBEDE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B85FD02A431318005FBEDE /* ViewController.swift */; };
@@ -24,15 +28,11 @@
2428
A8B860102A431AA6005FBEDE /* EZLoadingActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860082A431AA6005FBEDE /* EZLoadingActivity.swift */; };
2529
A8B860112A431AA6005FBEDE /* ImageWithTextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860092A431AA6005FBEDE /* ImageWithTextViewController.swift */; };
2630
A8B860132A432135005FBEDE /* openai.svg in Resources */ = {isa = PBXBuildFile; fileRef = A8B860122A432135005FBEDE /* openai.svg */; };
27-
A8B860192A432841005FBEDE /* ChatGPTAPIManager in Frameworks */ = {isa = PBXBuildFile; productRef = A8B860182A432841005FBEDE /* ChatGPTAPIManager */; };
2831
A8B860252A440C52005FBEDE /* MessageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860242A440C52005FBEDE /* MessageModel.swift */; };
2932
A8B8602D2A4413F2005FBEDE /* ChatViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B8602C2A4413F2005FBEDE /* ChatViewModel.swift */; };
3033
A8B8602F2A44140A005FBEDE /* ImageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B8602E2A441409005FBEDE /* ImageViewModel.swift */; };
3134
A8B860342A44431C005FBEDE /* TextGenerationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860332A44431C005FBEDE /* TextGenerationViewModel.swift */; };
3235
A8B8607C2A45AE40005FBEDE /* AudioViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */; };
33-
A8B8607E2A45B474005FBEDE /* sample-15s.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = A8B8607D2A45B474005FBEDE /* sample-15s.mp3 */; };
34-
A8B860802A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = A8B8607F2A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 */; };
35-
A8B860822A45C555005FBEDE /* Hindi Songs.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = A8B860812A45C555005FBEDE /* Hindi Songs.mp3 */; };
3636
/* End PBXBuildFile section */
3737

3838
/* Begin PBXContainerItemProxy section */
@@ -53,6 +53,10 @@
5353
/* End PBXContainerItemProxy section */
5454

5555
/* Begin PBXFileReference section */
56+
777D47282A53EA8F0050C0E7 /* chatgpt-ios-sdk */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "chatgpt-ios-sdk"; path = ..; sourceTree = "<group>"; };
57+
777D472D2A53F7550050C0E7 /* english_song.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = english_song.m4a; sourceTree = "<group>"; };
58+
777D472E2A53F7550050C0E7 /* translation_file.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = translation_file.m4a; sourceTree = "<group>"; };
59+
777D47312A5419150050C0E7 /* AudioViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioViewModel.swift; sourceTree = "<group>"; };
5660
A8B85FC92A431318005FBEDE /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
5761
A8B85FCC2A431318005FBEDE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5862
A8B85FCE2A431318005FBEDE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -79,17 +83,14 @@
7983
A8B8602E2A441409005FBEDE /* ImageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageViewModel.swift; sourceTree = "<group>"; };
8084
A8B860332A44431C005FBEDE /* TextGenerationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextGenerationViewModel.swift; sourceTree = "<group>"; };
8185
A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioViewController.swift; sourceTree = "<group>"; };
82-
A8B8607D2A45B474005FBEDE /* sample-15s.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "sample-15s.mp3"; sourceTree = "<group>"; };
83-
A8B8607F2A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "passenger-let-her-go-official-video.mp3"; sourceTree = "<group>"; };
84-
A8B860812A45C555005FBEDE /* Hindi Songs.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "Hindi Songs.mp3"; sourceTree = "<group>"; };
8586
/* End PBXFileReference section */
8687

8788
/* Begin PBXFrameworksBuildPhase section */
8889
A8B85FC62A431318005FBEDE /* Frameworks */ = {
8990
isa = PBXFrameworksBuildPhase;
9091
buildActionMask = 2147483647;
9192
files = (
92-
A8B860192A432841005FBEDE /* ChatGPTAPIManager in Frameworks */,
93+
777D472B2A53EA9D0050C0E7 /* ChatGPTAPIManager in Frameworks */,
9394
);
9495
runOnlyForDeploymentPostprocessing = 0;
9596
};
@@ -110,13 +111,30 @@
110111
/* End PBXFrameworksBuildPhase section */
111112

112113
/* Begin PBXGroup section */
114+
777D47292A53EA9D0050C0E7 /* Frameworks */ = {
115+
isa = PBXGroup;
116+
children = (
117+
);
118+
name = Frameworks;
119+
sourceTree = "<group>";
120+
};
121+
777D472C2A53F3730050C0E7 /* AudioTranslationAndTranscript */ = {
122+
isa = PBXGroup;
123+
children = (
124+
A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */,
125+
);
126+
path = AudioTranslationAndTranscript;
127+
sourceTree = "<group>";
128+
};
113129
A8B85FC02A431318005FBEDE = {
114130
isa = PBXGroup;
115131
children = (
132+
777D47282A53EA8F0050C0E7 /* chatgpt-ios-sdk */,
116133
A8B85FCB2A431318005FBEDE /* Example */,
117134
A8B85FE22A43131A005FBEDE /* ExampleTests */,
118135
A8B85FEC2A43131A005FBEDE /* ExampleUITests */,
119136
A8B85FCA2A431318005FBEDE /* Products */,
137+
777D47292A53EA9D0050C0E7 /* Frameworks */,
120138
);
121139
sourceTree = "<group>";
122140
};
@@ -163,12 +181,12 @@
163181
A8B860202A440BB9005FBEDE /* Views */ = {
164182
isa = PBXGroup;
165183
children = (
184+
A8B860262A440C79005FBEDE /* Cells */,
166185
A8B860322A444295005FBEDE /* TextToImage */,
167186
A8B860302A444288005FBEDE /* ChatAndText */,
168-
A8B860262A440C79005FBEDE /* Cells */,
187+
777D472C2A53F3730050C0E7 /* AudioTranslationAndTranscript */,
169188
A8B85FD02A431318005FBEDE /* ViewController.swift */,
170189
A8B860082A431AA6005FBEDE /* EZLoadingActivity.swift */,
171-
A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */,
172190
);
173191
path = Views;
174192
sourceTree = "<group>";
@@ -179,6 +197,7 @@
179197
A8B8602C2A4413F2005FBEDE /* ChatViewModel.swift */,
180198
A8B8602E2A441409005FBEDE /* ImageViewModel.swift */,
181199
A8B860332A44431C005FBEDE /* TextGenerationViewModel.swift */,
200+
777D47312A5419150050C0E7 /* AudioViewModel.swift */,
182201
);
183202
path = ViewModles;
184203
sourceTree = "<group>";
@@ -223,9 +242,8 @@
223242
A8B860292A440CC0005FBEDE /* Supporting */ = {
224243
isa = PBXGroup;
225244
children = (
226-
A8B8607D2A45B474005FBEDE /* sample-15s.mp3 */,
227-
A8B8607F2A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 */,
228-
A8B860812A45C555005FBEDE /* Hindi Songs.mp3 */,
245+
777D472D2A53F7550050C0E7 /* english_song.m4a */,
246+
777D472E2A53F7550050C0E7 /* translation_file.m4a */,
229247
A8B85FD52A43131A005FBEDE /* Assets.xcassets */,
230248
A8B860122A432135005FBEDE /* openai.svg */,
231249
A8B85FDA2A43131A005FBEDE /* Info.plist */,
@@ -266,7 +284,7 @@
266284
);
267285
name = Example;
268286
packageProductDependencies = (
269-
A8B860182A432841005FBEDE /* ChatGPTAPIManager */,
287+
777D472A2A53EA9D0050C0E7 /* ChatGPTAPIManager */,
270288
);
271289
productName = Example;
272290
productReference = A8B85FC92A431318005FBEDE /* Example.app */;
@@ -341,7 +359,6 @@
341359
);
342360
mainGroup = A8B85FC02A431318005FBEDE;
343361
packageReferences = (
344-
A8B860172A432841005FBEDE /* XCRemoteSwiftPackageReference "chatgpt-ios-sdk" */,
345362
);
346363
productRefGroup = A8B85FCA2A431318005FBEDE /* Products */;
347364
projectDirPath = "";
@@ -359,12 +376,11 @@
359376
isa = PBXResourcesBuildPhase;
360377
buildActionMask = 2147483647;
361378
files = (
379+
777D472F2A53F7560050C0E7 /* english_song.m4a in Resources */,
362380
A8B8600A2A431AA6005FBEDE /* UserCell.xib in Resources */,
363-
A8B8607E2A45B474005FBEDE /* sample-15s.mp3 in Resources */,
381+
777D47302A53F7560050C0E7 /* translation_file.m4a in Resources */,
364382
A8B85FD92A43131A005FBEDE /* LaunchScreen.storyboard in Resources */,
365383
A8B860132A432135005FBEDE /* openai.svg in Resources */,
366-
A8B860822A45C555005FBEDE /* Hindi Songs.mp3 in Resources */,
367-
A8B860802A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 in Resources */,
368384
A8B85FD62A43131A005FBEDE /* Assets.xcassets in Resources */,
369385
A8B8600F2A431AA6005FBEDE /* AssistantCell.xib in Resources */,
370386
A8B85FD42A431318005FBEDE /* Main.storyboard in Resources */,
@@ -399,6 +415,7 @@
399415
A8B85FD12A431318005FBEDE /* ViewController.swift in Sources */,
400416
A8B8600E2A431AA6005FBEDE /* ChatViewController.swift in Sources */,
401417
A8B860252A440C52005FBEDE /* MessageModel.swift in Sources */,
418+
777D47322A5419150050C0E7 /* AudioViewModel.swift in Sources */,
402419
A8B860102A431AA6005FBEDE /* EZLoadingActivity.swift in Sources */,
403420
A8B85FCD2A431318005FBEDE /* AppDelegate.swift in Sources */,
404421
A8B85FCF2A431318005FBEDE /* SceneDelegate.swift in Sources */,
@@ -745,21 +762,9 @@
745762
};
746763
/* End XCConfigurationList section */
747764

748-
/* Begin XCRemoteSwiftPackageReference section */
749-
A8B860172A432841005FBEDE /* XCRemoteSwiftPackageReference "chatgpt-ios-sdk" */ = {
750-
isa = XCRemoteSwiftPackageReference;
751-
repositoryURL = "https://github.com/DevCrew-io/chatgpt-ios-sdk.git";
752-
requirement = {
753-
kind = upToNextMajorVersion;
754-
minimumVersion = 1.0.2;
755-
};
756-
};
757-
/* End XCRemoteSwiftPackageReference section */
758-
759765
/* Begin XCSwiftPackageProductDependency section */
760-
A8B860182A432841005FBEDE /* ChatGPTAPIManager */ = {
766+
777D472A2A53EA9D0050C0E7 /* ChatGPTAPIManager */ = {
761767
isa = XCSwiftPackageProductDependency;
762-
package = A8B860172A432841005FBEDE /* XCRemoteSwiftPackageReference "chatgpt-ios-sdk" */;
763768
productName = ChatGPTAPIManager;
764769
};
765770
/* End XCSwiftPackageProductDependency section */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

-14
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>Example.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>

0 commit comments

Comments
 (0)