├── .gitignore ├── Podfile ├── Podfile.lock ├── README.md ├── SpeechTranslator.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── dbolella.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── SpeechTranslator.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── SpeechTranslator ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── ClosedCaptioning.swift ├── ContentView.swift ├── GoogleService-Info.plist ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── SceneDelegate.swift ├── SpeechTranslatorTests ├── Info.plist └── SpeechTranslatorTests.swift └── SpeechTranslatorUITests ├── Info.plist └── SpeechTranslatorUITests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | Pods/ 2 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'SpeechTranslator' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for SpeechTranslator 9 | # add pods for desired Firebase products 10 | pod 'Firebase' 11 | pod 'Firebase/MLNLTranslate' 12 | 13 | target 'SpeechTranslatorTests' do 14 | inherit! :search_paths 15 | # Pods for testing 16 | end 17 | 18 | target 'SpeechTranslatorUITests' do 19 | # Pods for testing 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Firebase (6.10.0): 3 | - Firebase/Core (= 6.10.0) 4 | - Firebase/Core (6.10.0): 5 | - Firebase/CoreOnly 6 | - FirebaseAnalytics (= 6.1.3) 7 | - Firebase/CoreOnly (6.10.0): 8 | - FirebaseCore (= 6.3.1) 9 | - Firebase/MLNLTranslate (6.10.0): 10 | - Firebase/CoreOnly 11 | - FirebaseMLNLTranslate (~> 0.17.0) 12 | - FirebaseABTesting (3.1.2): 13 | - FirebaseAnalyticsInterop (~> 1.3) 14 | - FirebaseCore (~> 6.1) 15 | - Protobuf (>= 3.9.2, ~> 3.9) 16 | - FirebaseAnalytics (6.1.3): 17 | - FirebaseCore (~> 6.3) 18 | - FirebaseInstanceID (~> 4.2) 19 | - GoogleAppMeasurement (= 6.1.3) 20 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 21 | - GoogleUtilities/MethodSwizzler (~> 6.0) 22 | - GoogleUtilities/Network (~> 6.0) 23 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 24 | - nanopb (~> 0.3.901) 25 | - FirebaseAnalyticsInterop (1.4.0) 26 | - FirebaseCore (6.3.1): 27 | - FirebaseCoreDiagnostics (~> 1.0) 28 | - FirebaseCoreDiagnosticsInterop (~> 1.0) 29 | - GoogleUtilities/Environment (~> 6.2) 30 | - GoogleUtilities/Logger (~> 6.2) 31 | - FirebaseCoreDiagnostics (1.1.1): 32 | - FirebaseCoreDiagnosticsInterop (~> 1.0) 33 | - GoogleDataTransportCCTSupport (~> 1.0) 34 | - GoogleUtilities/Environment (~> 6.2) 35 | - GoogleUtilities/Logger (~> 6.2) 36 | - nanopb (~> 0.3.901) 37 | - FirebaseCoreDiagnosticsInterop (1.0.0) 38 | - FirebaseInstanceID (4.2.5): 39 | - FirebaseCore (~> 6.0) 40 | - GoogleUtilities/Environment (~> 6.0) 41 | - GoogleUtilities/UserDefaults (~> 6.0) 42 | - FirebaseMLCommon (0.19.0): 43 | - FirebaseCore (~> 6.3) 44 | - FirebaseInstanceID (~> 4.2) 45 | - GoogleToolboxForMac/Logger (~> 2.1) 46 | - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" 47 | - "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)" 48 | - GoogleUtilities/UserDefaults (~> 6.0) 49 | - GTMSessionFetcher/Core (~> 1.1) 50 | - Protobuf (~> 3.5) 51 | - FirebaseMLNaturalLanguage (0.17.0): 52 | - FirebaseCore (~> 6.3) 53 | - FirebaseMLCommon (~> 0.19) 54 | - GoogleToolboxForMac/Logger (~> 2.1) 55 | - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" 56 | - "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)" 57 | - GTMSessionFetcher/Core (~> 1.1) 58 | - Protobuf (~> 3.5) 59 | - FirebaseMLNLTranslate (0.17.0): 60 | - FirebaseCore (~> 6.3) 61 | - FirebaseMLNaturalLanguage (~> 0.17) 62 | - FirebaseRemoteConfig (~> 4.4) 63 | - FirebaseRemoteConfig (4.4.2): 64 | - FirebaseABTesting (~> 3.1) 65 | - FirebaseAnalyticsInterop (~> 1.4) 66 | - FirebaseCore (~> 6.2) 67 | - FirebaseInstanceID (~> 4.2) 68 | - GoogleUtilities/Environment (~> 6.2) 69 | - "GoogleUtilities/NSData+zlib (~> 6.2)" 70 | - Protobuf (>= 3.9.2, ~> 3.9) 71 | - GoogleAppMeasurement (6.1.3): 72 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 73 | - GoogleUtilities/MethodSwizzler (~> 6.0) 74 | - GoogleUtilities/Network (~> 6.0) 75 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 76 | - nanopb (~> 0.3.901) 77 | - GoogleDataTransport (3.0.0) 78 | - GoogleDataTransportCCTSupport (1.2.0): 79 | - GoogleDataTransport (~> 3.0) 80 | - nanopb (~> 0.3.901) 81 | - GoogleToolboxForMac/DebugUtils (2.2.1): 82 | - GoogleToolboxForMac/Defines (= 2.2.1) 83 | - GoogleToolboxForMac/Defines (2.2.1) 84 | - GoogleToolboxForMac/Logger (2.2.1): 85 | - GoogleToolboxForMac/Defines (= 2.2.1) 86 | - "GoogleToolboxForMac/NSData+zlib (2.2.1)": 87 | - GoogleToolboxForMac/Defines (= 2.2.1) 88 | - "GoogleToolboxForMac/NSDictionary+URLArguments (2.2.1)": 89 | - GoogleToolboxForMac/DebugUtils (= 2.2.1) 90 | - GoogleToolboxForMac/Defines (= 2.2.1) 91 | - "GoogleToolboxForMac/NSString+URLArguments (= 2.2.1)" 92 | - "GoogleToolboxForMac/NSString+URLArguments (2.2.1)" 93 | - GoogleUtilities/AppDelegateSwizzler (6.3.1): 94 | - GoogleUtilities/Environment 95 | - GoogleUtilities/Logger 96 | - GoogleUtilities/Network 97 | - GoogleUtilities/Environment (6.3.1) 98 | - GoogleUtilities/Logger (6.3.1): 99 | - GoogleUtilities/Environment 100 | - GoogleUtilities/MethodSwizzler (6.3.1): 101 | - GoogleUtilities/Logger 102 | - GoogleUtilities/Network (6.3.1): 103 | - GoogleUtilities/Logger 104 | - "GoogleUtilities/NSData+zlib" 105 | - GoogleUtilities/Reachability 106 | - "GoogleUtilities/NSData+zlib (6.3.1)" 107 | - GoogleUtilities/Reachability (6.3.1): 108 | - GoogleUtilities/Logger 109 | - GoogleUtilities/UserDefaults (6.3.1): 110 | - GoogleUtilities/Logger 111 | - GTMSessionFetcher/Core (1.2.2) 112 | - nanopb (0.3.901): 113 | - nanopb/decode (= 0.3.901) 114 | - nanopb/encode (= 0.3.901) 115 | - nanopb/decode (0.3.901) 116 | - nanopb/encode (0.3.901) 117 | - Protobuf (3.10.0) 118 | 119 | DEPENDENCIES: 120 | - Firebase 121 | - Firebase/MLNLTranslate 122 | 123 | SPEC REPOS: 124 | trunk: 125 | - Firebase 126 | - FirebaseABTesting 127 | - FirebaseAnalytics 128 | - FirebaseAnalyticsInterop 129 | - FirebaseCore 130 | - FirebaseCoreDiagnostics 131 | - FirebaseCoreDiagnosticsInterop 132 | - FirebaseInstanceID 133 | - FirebaseMLCommon 134 | - FirebaseMLNaturalLanguage 135 | - FirebaseMLNLTranslate 136 | - FirebaseRemoteConfig 137 | - GoogleAppMeasurement 138 | - GoogleDataTransport 139 | - GoogleDataTransportCCTSupport 140 | - GoogleToolboxForMac 141 | - GoogleUtilities 142 | - GTMSessionFetcher 143 | - nanopb 144 | - Protobuf 145 | 146 | SPEC CHECKSUMS: 147 | Firebase: 5e6b7b12bf9adb90986688edc06b156c37e109cd 148 | FirebaseABTesting: 0d10f3cdc3fa00f3f175b5b56c1003c8e888299f 149 | FirebaseAnalytics: 0e3ecff2c5d86070f7d4325e21f1edabfbd558dc 150 | FirebaseAnalyticsInterop: d48b6ab67bcf016a05e55b71fc39c61c0cb6b7f3 151 | FirebaseCore: 064c2dd92a8ca5974bbdcb080df9921e46bd34cd 152 | FirebaseCoreDiagnostics: af29e43048607588c050889d19204f4d7b758c9f 153 | FirebaseCoreDiagnosticsInterop: 6829da2b8d1fc795ff1bd99df751d3788035d2cb 154 | FirebaseInstanceID: 550df9be1f99f751d8fcde3ac342a1e21a0e6c42 155 | FirebaseMLCommon: 074a67e05122b1c9f6401a4e33b2cea3b4efd224 156 | FirebaseMLNaturalLanguage: 9d38301a41b1201d248588bf66937b975391e8f4 157 | FirebaseMLNLTranslate: ed248c2c2eaf3bc2450505e3e0c4c8487c7879fd 158 | FirebaseRemoteConfig: 03efa57106f9b6f7afe36658de4a9c67c803d3a8 159 | GoogleAppMeasurement: 434cc7be25e71dc04b8d0e3079125127b330e84a 160 | GoogleDataTransport: f6fe28f43e3a300736854260961ad485b473edc5 161 | GoogleDataTransportCCTSupport: 862418a8cdda520c4dd4af83a756d04efe4a6990 162 | GoogleToolboxForMac: b3553629623a3b1bff17f555e736cd5a6d95ad55 163 | GoogleUtilities: f895fde57977df4e0233edda0dbeac490e3703b6 164 | GTMSessionFetcher: 61bb0f61a4cb560030f1222021178008a5727a23 165 | nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48 166 | Protobuf: a4dc852ad69c027ca2166ed287b856697814375b 167 | 168 | PODFILE CHECKSUM: 06cefee58ad5f649c8be92159a8274d2aa32b38b 169 | 170 | COCOAPODS: 1.8.3 171 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SpeechTranslatorSwiftUI 2 | 3 | The latest version of SFSpeechRecognizer allows offline speech-to-text, amongst other new features. 4 | 5 | Combine that with ML Kit's Translate feature, which also works offline as of this year, we can make a speech translator. 6 | 7 | ## Authors 8 | 9 | * **Danny Bolella** - *Initial work* - [TheDB](https://dbolella.github.io/) 10 | 11 | ## License 12 | 13 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details 14 | 15 | ## SUPER Acknowledgments 16 | Heavy influence from: 17 | https://developer.apple.com/documentation/speech/recognizing_speech_in_live_audio 18 | -------------------------------------------------------------------------------- /SpeechTranslator.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0A29C2A9234E6D25003D0163 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0A29C2A8234E6D25003D0163 /* GoogleService-Info.plist */; }; 11 | 0A78DA90234E292C00775D47 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A78DA8F234E292C00775D47 /* AppDelegate.swift */; }; 12 | 0A78DA92234E292C00775D47 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A78DA91234E292C00775D47 /* SceneDelegate.swift */; }; 13 | 0A78DA94234E292C00775D47 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A78DA93234E292C00775D47 /* ContentView.swift */; }; 14 | 0A78DA96234E293100775D47 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0A78DA95234E293100775D47 /* Assets.xcassets */; }; 15 | 0A78DA99234E293100775D47 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0A78DA98234E293100775D47 /* Preview Assets.xcassets */; }; 16 | 0A78DA9C234E293100775D47 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0A78DA9A234E293100775D47 /* LaunchScreen.storyboard */; }; 17 | 0A78DAA7234E293100775D47 /* SpeechTranslatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A78DAA6234E293100775D47 /* SpeechTranslatorTests.swift */; }; 18 | 0A78DAB2234E293100775D47 /* SpeechTranslatorUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A78DAB1234E293100775D47 /* SpeechTranslatorUITests.swift */; }; 19 | 0A78DAC0234E2AE400775D47 /* ClosedCaptioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A78DABF234E2AE400775D47 /* ClosedCaptioning.swift */; }; 20 | 327B6C1278943B09AB941F95 /* Pods_SpeechTranslator_SpeechTranslatorUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F15B086ABBE1F537BE7D33E5 /* Pods_SpeechTranslator_SpeechTranslatorUITests.framework */; }; 21 | 78C18317A80C88DAE9F5B81E /* Pods_SpeechTranslator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C77028BED6B29A6FA5D1759E /* Pods_SpeechTranslator.framework */; }; 22 | B1A3A3D08A80A86A74F32E7D /* Pods_SpeechTranslatorTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0271FE93014F7CBF50EFBCF5 /* Pods_SpeechTranslatorTests.framework */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | 0A78DAA3234E293100775D47 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = 0A78DA84234E292C00775D47 /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = 0A78DA8B234E292C00775D47; 31 | remoteInfo = SpeechTranslator; 32 | }; 33 | 0A78DAAE234E293100775D47 /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = 0A78DA84234E292C00775D47 /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = 0A78DA8B234E292C00775D47; 38 | remoteInfo = SpeechTranslator; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 012F12D6D60E642EEB8894A4 /* Pods-SpeechTranslator.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeechTranslator.release.xcconfig"; path = "Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator.release.xcconfig"; sourceTree = ""; }; 44 | 0271FE93014F7CBF50EFBCF5 /* Pods_SpeechTranslatorTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SpeechTranslatorTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 0A29C2A8234E6D25003D0163 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 46 | 0A78DA8C234E292C00775D47 /* SpeechTranslator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpeechTranslator.app; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 0A78DA8F234E292C00775D47 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 48 | 0A78DA91234E292C00775D47 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 49 | 0A78DA93234E292C00775D47 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 50 | 0A78DA95234E293100775D47 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 0A78DA98234E293100775D47 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 52 | 0A78DA9B234E293100775D47 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 0A78DA9D234E293100775D47 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 0A78DAA2234E293100775D47 /* SpeechTranslatorTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpeechTranslatorTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 0A78DAA6234E293100775D47 /* SpeechTranslatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeechTranslatorTests.swift; sourceTree = ""; }; 56 | 0A78DAA8234E293100775D47 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 0A78DAAD234E293100775D47 /* SpeechTranslatorUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpeechTranslatorUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 0A78DAB1234E293100775D47 /* SpeechTranslatorUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeechTranslatorUITests.swift; sourceTree = ""; }; 59 | 0A78DAB3234E293100775D47 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | 0A78DABF234E2AE400775D47 /* ClosedCaptioning.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClosedCaptioning.swift; sourceTree = ""; }; 61 | 3F16CEDF79F7D6EB0120F922 /* Pods-SpeechTranslator-SpeechTranslatorUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeechTranslator-SpeechTranslatorUITests.release.xcconfig"; path = "Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests.release.xcconfig"; sourceTree = ""; }; 62 | 92289BC1942069136E3DF374 /* Pods-SpeechTranslator-SpeechTranslatorUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeechTranslator-SpeechTranslatorUITests.debug.xcconfig"; path = "Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests.debug.xcconfig"; sourceTree = ""; }; 63 | C77028BED6B29A6FA5D1759E /* Pods_SpeechTranslator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SpeechTranslator.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 64 | C82BA00042C8D3F214957B2A /* Pods-SpeechTranslatorTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeechTranslatorTests.release.xcconfig"; path = "Target Support Files/Pods-SpeechTranslatorTests/Pods-SpeechTranslatorTests.release.xcconfig"; sourceTree = ""; }; 65 | CCF7BFDABDACBAD7C1EB013E /* Pods-SpeechTranslator.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeechTranslator.debug.xcconfig"; path = "Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator.debug.xcconfig"; sourceTree = ""; }; 66 | D8DD7F2D28BDD494D7BC8936 /* Pods-SpeechTranslatorTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SpeechTranslatorTests.debug.xcconfig"; path = "Target Support Files/Pods-SpeechTranslatorTests/Pods-SpeechTranslatorTests.debug.xcconfig"; sourceTree = ""; }; 67 | F15B086ABBE1F537BE7D33E5 /* Pods_SpeechTranslator_SpeechTranslatorUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SpeechTranslator_SpeechTranslatorUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | 0A78DA89234E292C00775D47 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 78C18317A80C88DAE9F5B81E /* Pods_SpeechTranslator.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | 0A78DA9F234E293100775D47 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | B1A3A3D08A80A86A74F32E7D /* Pods_SpeechTranslatorTests.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | 0A78DAAA234E293100775D47 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | 327B6C1278943B09AB941F95 /* Pods_SpeechTranslator_SpeechTranslatorUITests.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 0A78DA83234E292C00775D47 = { 99 | isa = PBXGroup; 100 | children = ( 101 | 0A78DA8E234E292C00775D47 /* SpeechTranslator */, 102 | 0A78DAA5234E293100775D47 /* SpeechTranslatorTests */, 103 | 0A78DAB0234E293100775D47 /* SpeechTranslatorUITests */, 104 | 0A78DA8D234E292C00775D47 /* Products */, 105 | 135A1E95DB60DC13CCBC923E /* Pods */, 106 | E285A0686E47739888AB5A98 /* Frameworks */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 0A78DA8D234E292C00775D47 /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 0A78DA8C234E292C00775D47 /* SpeechTranslator.app */, 114 | 0A78DAA2234E293100775D47 /* SpeechTranslatorTests.xctest */, 115 | 0A78DAAD234E293100775D47 /* SpeechTranslatorUITests.xctest */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | 0A78DA8E234E292C00775D47 /* SpeechTranslator */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 0A78DA8F234E292C00775D47 /* AppDelegate.swift */, 124 | 0A78DA91234E292C00775D47 /* SceneDelegate.swift */, 125 | 0A78DABF234E2AE400775D47 /* ClosedCaptioning.swift */, 126 | 0A78DA93234E292C00775D47 /* ContentView.swift */, 127 | 0A78DA95234E293100775D47 /* Assets.xcassets */, 128 | 0A78DA9A234E293100775D47 /* LaunchScreen.storyboard */, 129 | 0A78DA9D234E293100775D47 /* Info.plist */, 130 | 0A29C2A8234E6D25003D0163 /* GoogleService-Info.plist */, 131 | 0A78DA97234E293100775D47 /* Preview Content */, 132 | ); 133 | path = SpeechTranslator; 134 | sourceTree = ""; 135 | }; 136 | 0A78DA97234E293100775D47 /* Preview Content */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 0A78DA98234E293100775D47 /* Preview Assets.xcassets */, 140 | ); 141 | path = "Preview Content"; 142 | sourceTree = ""; 143 | }; 144 | 0A78DAA5234E293100775D47 /* SpeechTranslatorTests */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 0A78DAA6234E293100775D47 /* SpeechTranslatorTests.swift */, 148 | 0A78DAA8234E293100775D47 /* Info.plist */, 149 | ); 150 | path = SpeechTranslatorTests; 151 | sourceTree = ""; 152 | }; 153 | 0A78DAB0234E293100775D47 /* SpeechTranslatorUITests */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 0A78DAB1234E293100775D47 /* SpeechTranslatorUITests.swift */, 157 | 0A78DAB3234E293100775D47 /* Info.plist */, 158 | ); 159 | path = SpeechTranslatorUITests; 160 | sourceTree = ""; 161 | }; 162 | 135A1E95DB60DC13CCBC923E /* Pods */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | CCF7BFDABDACBAD7C1EB013E /* Pods-SpeechTranslator.debug.xcconfig */, 166 | 012F12D6D60E642EEB8894A4 /* Pods-SpeechTranslator.release.xcconfig */, 167 | 92289BC1942069136E3DF374 /* Pods-SpeechTranslator-SpeechTranslatorUITests.debug.xcconfig */, 168 | 3F16CEDF79F7D6EB0120F922 /* Pods-SpeechTranslator-SpeechTranslatorUITests.release.xcconfig */, 169 | D8DD7F2D28BDD494D7BC8936 /* Pods-SpeechTranslatorTests.debug.xcconfig */, 170 | C82BA00042C8D3F214957B2A /* Pods-SpeechTranslatorTests.release.xcconfig */, 171 | ); 172 | path = Pods; 173 | sourceTree = ""; 174 | }; 175 | E285A0686E47739888AB5A98 /* Frameworks */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | C77028BED6B29A6FA5D1759E /* Pods_SpeechTranslator.framework */, 179 | F15B086ABBE1F537BE7D33E5 /* Pods_SpeechTranslator_SpeechTranslatorUITests.framework */, 180 | 0271FE93014F7CBF50EFBCF5 /* Pods_SpeechTranslatorTests.framework */, 181 | ); 182 | name = Frameworks; 183 | sourceTree = ""; 184 | }; 185 | /* End PBXGroup section */ 186 | 187 | /* Begin PBXNativeTarget section */ 188 | 0A78DA8B234E292C00775D47 /* SpeechTranslator */ = { 189 | isa = PBXNativeTarget; 190 | buildConfigurationList = 0A78DAB6234E293100775D47 /* Build configuration list for PBXNativeTarget "SpeechTranslator" */; 191 | buildPhases = ( 192 | 770ED6403D313B885ADBAC0D /* [CP] Check Pods Manifest.lock */, 193 | 0A78DA88234E292C00775D47 /* Sources */, 194 | 0A78DA89234E292C00775D47 /* Frameworks */, 195 | 0A78DA8A234E292C00775D47 /* Resources */, 196 | CAEE87857B173DD9588484A6 /* [CP] Embed Pods Frameworks */, 197 | 7DADA004CAC6B43D79CC3035 /* [CP] Copy Pods Resources */, 198 | ); 199 | buildRules = ( 200 | ); 201 | dependencies = ( 202 | ); 203 | name = SpeechTranslator; 204 | productName = SpeechTranslator; 205 | productReference = 0A78DA8C234E292C00775D47 /* SpeechTranslator.app */; 206 | productType = "com.apple.product-type.application"; 207 | }; 208 | 0A78DAA1234E293100775D47 /* SpeechTranslatorTests */ = { 209 | isa = PBXNativeTarget; 210 | buildConfigurationList = 0A78DAB9234E293100775D47 /* Build configuration list for PBXNativeTarget "SpeechTranslatorTests" */; 211 | buildPhases = ( 212 | C6B026A6D3F877700F30853D /* [CP] Check Pods Manifest.lock */, 213 | 0A78DA9E234E293100775D47 /* Sources */, 214 | 0A78DA9F234E293100775D47 /* Frameworks */, 215 | 0A78DAA0234E293100775D47 /* Resources */, 216 | ); 217 | buildRules = ( 218 | ); 219 | dependencies = ( 220 | 0A78DAA4234E293100775D47 /* PBXTargetDependency */, 221 | ); 222 | name = SpeechTranslatorTests; 223 | productName = SpeechTranslatorTests; 224 | productReference = 0A78DAA2234E293100775D47 /* SpeechTranslatorTests.xctest */; 225 | productType = "com.apple.product-type.bundle.unit-test"; 226 | }; 227 | 0A78DAAC234E293100775D47 /* SpeechTranslatorUITests */ = { 228 | isa = PBXNativeTarget; 229 | buildConfigurationList = 0A78DABC234E293100775D47 /* Build configuration list for PBXNativeTarget "SpeechTranslatorUITests" */; 230 | buildPhases = ( 231 | 8E314C89D8E95832295CAA89 /* [CP] Check Pods Manifest.lock */, 232 | 0A78DAA9234E293100775D47 /* Sources */, 233 | 0A78DAAA234E293100775D47 /* Frameworks */, 234 | 0A78DAAB234E293100775D47 /* Resources */, 235 | 117236E511F59A62D900C70D /* [CP] Embed Pods Frameworks */, 236 | 2A1A301C765B2539E81053BD /* [CP] Copy Pods Resources */, 237 | ); 238 | buildRules = ( 239 | ); 240 | dependencies = ( 241 | 0A78DAAF234E293100775D47 /* PBXTargetDependency */, 242 | ); 243 | name = SpeechTranslatorUITests; 244 | productName = SpeechTranslatorUITests; 245 | productReference = 0A78DAAD234E293100775D47 /* SpeechTranslatorUITests.xctest */; 246 | productType = "com.apple.product-type.bundle.ui-testing"; 247 | }; 248 | /* End PBXNativeTarget section */ 249 | 250 | /* Begin PBXProject section */ 251 | 0A78DA84234E292C00775D47 /* Project object */ = { 252 | isa = PBXProject; 253 | attributes = { 254 | LastSwiftUpdateCheck = 1110; 255 | LastUpgradeCheck = 1110; 256 | ORGANIZATIONNAME = "Daniel Bolella"; 257 | TargetAttributes = { 258 | 0A78DA8B234E292C00775D47 = { 259 | CreatedOnToolsVersion = 11.1; 260 | }; 261 | 0A78DAA1234E293100775D47 = { 262 | CreatedOnToolsVersion = 11.1; 263 | TestTargetID = 0A78DA8B234E292C00775D47; 264 | }; 265 | 0A78DAAC234E293100775D47 = { 266 | CreatedOnToolsVersion = 11.1; 267 | TestTargetID = 0A78DA8B234E292C00775D47; 268 | }; 269 | }; 270 | }; 271 | buildConfigurationList = 0A78DA87234E292C00775D47 /* Build configuration list for PBXProject "SpeechTranslator" */; 272 | compatibilityVersion = "Xcode 9.3"; 273 | developmentRegion = en; 274 | hasScannedForEncodings = 0; 275 | knownRegions = ( 276 | en, 277 | Base, 278 | ); 279 | mainGroup = 0A78DA83234E292C00775D47; 280 | productRefGroup = 0A78DA8D234E292C00775D47 /* Products */; 281 | projectDirPath = ""; 282 | projectRoot = ""; 283 | targets = ( 284 | 0A78DA8B234E292C00775D47 /* SpeechTranslator */, 285 | 0A78DAA1234E293100775D47 /* SpeechTranslatorTests */, 286 | 0A78DAAC234E293100775D47 /* SpeechTranslatorUITests */, 287 | ); 288 | }; 289 | /* End PBXProject section */ 290 | 291 | /* Begin PBXResourcesBuildPhase section */ 292 | 0A78DA8A234E292C00775D47 /* Resources */ = { 293 | isa = PBXResourcesBuildPhase; 294 | buildActionMask = 2147483647; 295 | files = ( 296 | 0A78DA9C234E293100775D47 /* LaunchScreen.storyboard in Resources */, 297 | 0A29C2A9234E6D25003D0163 /* GoogleService-Info.plist in Resources */, 298 | 0A78DA99234E293100775D47 /* Preview Assets.xcassets in Resources */, 299 | 0A78DA96234E293100775D47 /* Assets.xcassets in Resources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | 0A78DAA0234E293100775D47 /* Resources */ = { 304 | isa = PBXResourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | 0A78DAAB234E293100775D47 /* Resources */ = { 311 | isa = PBXResourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | /* End PBXResourcesBuildPhase section */ 318 | 319 | /* Begin PBXShellScriptBuildPhase section */ 320 | 117236E511F59A62D900C70D /* [CP] Embed Pods Frameworks */ = { 321 | isa = PBXShellScriptBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | ); 325 | inputFileListPaths = ( 326 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 327 | ); 328 | name = "[CP] Embed Pods Frameworks"; 329 | outputFileListPaths = ( 330 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | shellPath = /bin/sh; 334 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests-frameworks.sh\"\n"; 335 | showEnvVarsInLog = 0; 336 | }; 337 | 2A1A301C765B2539E81053BD /* [CP] Copy Pods Resources */ = { 338 | isa = PBXShellScriptBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | ); 342 | inputFileListPaths = ( 343 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests-resources-${CONFIGURATION}-input-files.xcfilelist", 344 | ); 345 | name = "[CP] Copy Pods Resources"; 346 | outputFileListPaths = ( 347 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests-resources-${CONFIGURATION}-output-files.xcfilelist", 348 | ); 349 | runOnlyForDeploymentPostprocessing = 0; 350 | shellPath = /bin/sh; 351 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator-SpeechTranslatorUITests/Pods-SpeechTranslator-SpeechTranslatorUITests-resources.sh\"\n"; 352 | showEnvVarsInLog = 0; 353 | }; 354 | 770ED6403D313B885ADBAC0D /* [CP] Check Pods Manifest.lock */ = { 355 | isa = PBXShellScriptBuildPhase; 356 | buildActionMask = 2147483647; 357 | files = ( 358 | ); 359 | inputFileListPaths = ( 360 | ); 361 | inputPaths = ( 362 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 363 | "${PODS_ROOT}/Manifest.lock", 364 | ); 365 | name = "[CP] Check Pods Manifest.lock"; 366 | outputFileListPaths = ( 367 | ); 368 | outputPaths = ( 369 | "$(DERIVED_FILE_DIR)/Pods-SpeechTranslator-checkManifestLockResult.txt", 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | shellPath = /bin/sh; 373 | 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"; 374 | showEnvVarsInLog = 0; 375 | }; 376 | 7DADA004CAC6B43D79CC3035 /* [CP] Copy Pods Resources */ = { 377 | isa = PBXShellScriptBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | ); 381 | inputFileListPaths = ( 382 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator-resources-${CONFIGURATION}-input-files.xcfilelist", 383 | ); 384 | name = "[CP] Copy Pods Resources"; 385 | outputFileListPaths = ( 386 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator-resources-${CONFIGURATION}-output-files.xcfilelist", 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | shellPath = /bin/sh; 390 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator-resources.sh\"\n"; 391 | showEnvVarsInLog = 0; 392 | }; 393 | 8E314C89D8E95832295CAA89 /* [CP] Check Pods Manifest.lock */ = { 394 | isa = PBXShellScriptBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | ); 398 | inputFileListPaths = ( 399 | ); 400 | inputPaths = ( 401 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 402 | "${PODS_ROOT}/Manifest.lock", 403 | ); 404 | name = "[CP] Check Pods Manifest.lock"; 405 | outputFileListPaths = ( 406 | ); 407 | outputPaths = ( 408 | "$(DERIVED_FILE_DIR)/Pods-SpeechTranslator-SpeechTranslatorUITests-checkManifestLockResult.txt", 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | shellPath = /bin/sh; 412 | 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"; 413 | showEnvVarsInLog = 0; 414 | }; 415 | C6B026A6D3F877700F30853D /* [CP] Check Pods Manifest.lock */ = { 416 | isa = PBXShellScriptBuildPhase; 417 | buildActionMask = 2147483647; 418 | files = ( 419 | ); 420 | inputFileListPaths = ( 421 | ); 422 | inputPaths = ( 423 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 424 | "${PODS_ROOT}/Manifest.lock", 425 | ); 426 | name = "[CP] Check Pods Manifest.lock"; 427 | outputFileListPaths = ( 428 | ); 429 | outputPaths = ( 430 | "$(DERIVED_FILE_DIR)/Pods-SpeechTranslatorTests-checkManifestLockResult.txt", 431 | ); 432 | runOnlyForDeploymentPostprocessing = 0; 433 | shellPath = /bin/sh; 434 | 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"; 435 | showEnvVarsInLog = 0; 436 | }; 437 | CAEE87857B173DD9588484A6 /* [CP] Embed Pods Frameworks */ = { 438 | isa = PBXShellScriptBuildPhase; 439 | buildActionMask = 2147483647; 440 | files = ( 441 | ); 442 | inputFileListPaths = ( 443 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator-frameworks-${CONFIGURATION}-input-files.xcfilelist", 444 | ); 445 | name = "[CP] Embed Pods Frameworks"; 446 | outputFileListPaths = ( 447 | "${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator-frameworks-${CONFIGURATION}-output-files.xcfilelist", 448 | ); 449 | runOnlyForDeploymentPostprocessing = 0; 450 | shellPath = /bin/sh; 451 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SpeechTranslator/Pods-SpeechTranslator-frameworks.sh\"\n"; 452 | showEnvVarsInLog = 0; 453 | }; 454 | /* End PBXShellScriptBuildPhase section */ 455 | 456 | /* Begin PBXSourcesBuildPhase section */ 457 | 0A78DA88234E292C00775D47 /* Sources */ = { 458 | isa = PBXSourcesBuildPhase; 459 | buildActionMask = 2147483647; 460 | files = ( 461 | 0A78DA90234E292C00775D47 /* AppDelegate.swift in Sources */, 462 | 0A78DA92234E292C00775D47 /* SceneDelegate.swift in Sources */, 463 | 0A78DA94234E292C00775D47 /* ContentView.swift in Sources */, 464 | 0A78DAC0234E2AE400775D47 /* ClosedCaptioning.swift in Sources */, 465 | ); 466 | runOnlyForDeploymentPostprocessing = 0; 467 | }; 468 | 0A78DA9E234E293100775D47 /* Sources */ = { 469 | isa = PBXSourcesBuildPhase; 470 | buildActionMask = 2147483647; 471 | files = ( 472 | 0A78DAA7234E293100775D47 /* SpeechTranslatorTests.swift in Sources */, 473 | ); 474 | runOnlyForDeploymentPostprocessing = 0; 475 | }; 476 | 0A78DAA9234E293100775D47 /* Sources */ = { 477 | isa = PBXSourcesBuildPhase; 478 | buildActionMask = 2147483647; 479 | files = ( 480 | 0A78DAB2234E293100775D47 /* SpeechTranslatorUITests.swift in Sources */, 481 | ); 482 | runOnlyForDeploymentPostprocessing = 0; 483 | }; 484 | /* End PBXSourcesBuildPhase section */ 485 | 486 | /* Begin PBXTargetDependency section */ 487 | 0A78DAA4234E293100775D47 /* PBXTargetDependency */ = { 488 | isa = PBXTargetDependency; 489 | target = 0A78DA8B234E292C00775D47 /* SpeechTranslator */; 490 | targetProxy = 0A78DAA3234E293100775D47 /* PBXContainerItemProxy */; 491 | }; 492 | 0A78DAAF234E293100775D47 /* PBXTargetDependency */ = { 493 | isa = PBXTargetDependency; 494 | target = 0A78DA8B234E292C00775D47 /* SpeechTranslator */; 495 | targetProxy = 0A78DAAE234E293100775D47 /* PBXContainerItemProxy */; 496 | }; 497 | /* End PBXTargetDependency section */ 498 | 499 | /* Begin PBXVariantGroup section */ 500 | 0A78DA9A234E293100775D47 /* LaunchScreen.storyboard */ = { 501 | isa = PBXVariantGroup; 502 | children = ( 503 | 0A78DA9B234E293100775D47 /* Base */, 504 | ); 505 | name = LaunchScreen.storyboard; 506 | sourceTree = ""; 507 | }; 508 | /* End PBXVariantGroup section */ 509 | 510 | /* Begin XCBuildConfiguration section */ 511 | 0A78DAB4234E293100775D47 /* Debug */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | ALWAYS_SEARCH_USER_PATHS = NO; 515 | CLANG_ANALYZER_NONNULL = YES; 516 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 517 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 518 | CLANG_CXX_LIBRARY = "libc++"; 519 | CLANG_ENABLE_MODULES = YES; 520 | CLANG_ENABLE_OBJC_ARC = YES; 521 | CLANG_ENABLE_OBJC_WEAK = YES; 522 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 523 | CLANG_WARN_BOOL_CONVERSION = YES; 524 | CLANG_WARN_COMMA = YES; 525 | CLANG_WARN_CONSTANT_CONVERSION = YES; 526 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 527 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 528 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 529 | CLANG_WARN_EMPTY_BODY = YES; 530 | CLANG_WARN_ENUM_CONVERSION = YES; 531 | CLANG_WARN_INFINITE_RECURSION = YES; 532 | CLANG_WARN_INT_CONVERSION = YES; 533 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 534 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 535 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 536 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 537 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 538 | CLANG_WARN_STRICT_PROTOTYPES = YES; 539 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 540 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 541 | CLANG_WARN_UNREACHABLE_CODE = YES; 542 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 543 | COPY_PHASE_STRIP = NO; 544 | DEBUG_INFORMATION_FORMAT = dwarf; 545 | ENABLE_STRICT_OBJC_MSGSEND = YES; 546 | ENABLE_TESTABILITY = YES; 547 | GCC_C_LANGUAGE_STANDARD = gnu11; 548 | GCC_DYNAMIC_NO_PIC = NO; 549 | GCC_NO_COMMON_BLOCKS = YES; 550 | GCC_OPTIMIZATION_LEVEL = 0; 551 | GCC_PREPROCESSOR_DEFINITIONS = ( 552 | "DEBUG=1", 553 | "$(inherited)", 554 | ); 555 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 556 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 557 | GCC_WARN_UNDECLARED_SELECTOR = YES; 558 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 559 | GCC_WARN_UNUSED_FUNCTION = YES; 560 | GCC_WARN_UNUSED_VARIABLE = YES; 561 | IPHONEOS_DEPLOYMENT_TARGET = 13.1; 562 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 563 | MTL_FAST_MATH = YES; 564 | ONLY_ACTIVE_ARCH = YES; 565 | SDKROOT = iphoneos; 566 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 567 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 568 | }; 569 | name = Debug; 570 | }; 571 | 0A78DAB5234E293100775D47 /* Release */ = { 572 | isa = XCBuildConfiguration; 573 | buildSettings = { 574 | ALWAYS_SEARCH_USER_PATHS = NO; 575 | CLANG_ANALYZER_NONNULL = YES; 576 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 577 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 578 | CLANG_CXX_LIBRARY = "libc++"; 579 | CLANG_ENABLE_MODULES = YES; 580 | CLANG_ENABLE_OBJC_ARC = YES; 581 | CLANG_ENABLE_OBJC_WEAK = YES; 582 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 583 | CLANG_WARN_BOOL_CONVERSION = YES; 584 | CLANG_WARN_COMMA = YES; 585 | CLANG_WARN_CONSTANT_CONVERSION = YES; 586 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 587 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 588 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 589 | CLANG_WARN_EMPTY_BODY = YES; 590 | CLANG_WARN_ENUM_CONVERSION = YES; 591 | CLANG_WARN_INFINITE_RECURSION = YES; 592 | CLANG_WARN_INT_CONVERSION = YES; 593 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 594 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 595 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 596 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 597 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 598 | CLANG_WARN_STRICT_PROTOTYPES = YES; 599 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 600 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 601 | CLANG_WARN_UNREACHABLE_CODE = YES; 602 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 603 | COPY_PHASE_STRIP = NO; 604 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 605 | ENABLE_NS_ASSERTIONS = NO; 606 | ENABLE_STRICT_OBJC_MSGSEND = YES; 607 | GCC_C_LANGUAGE_STANDARD = gnu11; 608 | GCC_NO_COMMON_BLOCKS = YES; 609 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 610 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 611 | GCC_WARN_UNDECLARED_SELECTOR = YES; 612 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 613 | GCC_WARN_UNUSED_FUNCTION = YES; 614 | GCC_WARN_UNUSED_VARIABLE = YES; 615 | IPHONEOS_DEPLOYMENT_TARGET = 13.1; 616 | MTL_ENABLE_DEBUG_INFO = NO; 617 | MTL_FAST_MATH = YES; 618 | SDKROOT = iphoneos; 619 | SWIFT_COMPILATION_MODE = wholemodule; 620 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 621 | VALIDATE_PRODUCT = YES; 622 | }; 623 | name = Release; 624 | }; 625 | 0A78DAB7234E293100775D47 /* Debug */ = { 626 | isa = XCBuildConfiguration; 627 | baseConfigurationReference = CCF7BFDABDACBAD7C1EB013E /* Pods-SpeechTranslator.debug.xcconfig */; 628 | buildSettings = { 629 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 630 | CODE_SIGN_STYLE = Automatic; 631 | DEVELOPMENT_ASSET_PATHS = "\"SpeechTranslator/Preview Content\""; 632 | DEVELOPMENT_TEAM = 34SV2497XG; 633 | ENABLE_PREVIEWS = YES; 634 | INFOPLIST_FILE = SpeechTranslator/Info.plist; 635 | LD_RUNPATH_SEARCH_PATHS = ( 636 | "$(inherited)", 637 | "@executable_path/Frameworks", 638 | ); 639 | PRODUCT_BUNDLE_IDENTIFIER = com.bolella.SpeechTranslator; 640 | PRODUCT_NAME = "$(TARGET_NAME)"; 641 | SWIFT_VERSION = 5.0; 642 | TARGETED_DEVICE_FAMILY = "1,2"; 643 | }; 644 | name = Debug; 645 | }; 646 | 0A78DAB8234E293100775D47 /* Release */ = { 647 | isa = XCBuildConfiguration; 648 | baseConfigurationReference = 012F12D6D60E642EEB8894A4 /* Pods-SpeechTranslator.release.xcconfig */; 649 | buildSettings = { 650 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 651 | CODE_SIGN_STYLE = Automatic; 652 | DEVELOPMENT_ASSET_PATHS = "\"SpeechTranslator/Preview Content\""; 653 | DEVELOPMENT_TEAM = 34SV2497XG; 654 | ENABLE_PREVIEWS = YES; 655 | INFOPLIST_FILE = SpeechTranslator/Info.plist; 656 | LD_RUNPATH_SEARCH_PATHS = ( 657 | "$(inherited)", 658 | "@executable_path/Frameworks", 659 | ); 660 | PRODUCT_BUNDLE_IDENTIFIER = com.bolella.SpeechTranslator; 661 | PRODUCT_NAME = "$(TARGET_NAME)"; 662 | SWIFT_VERSION = 5.0; 663 | TARGETED_DEVICE_FAMILY = "1,2"; 664 | }; 665 | name = Release; 666 | }; 667 | 0A78DABA234E293100775D47 /* Debug */ = { 668 | isa = XCBuildConfiguration; 669 | baseConfigurationReference = D8DD7F2D28BDD494D7BC8936 /* Pods-SpeechTranslatorTests.debug.xcconfig */; 670 | buildSettings = { 671 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 672 | BUNDLE_LOADER = "$(TEST_HOST)"; 673 | CODE_SIGN_STYLE = Automatic; 674 | INFOPLIST_FILE = SpeechTranslatorTests/Info.plist; 675 | IPHONEOS_DEPLOYMENT_TARGET = 13.1; 676 | LD_RUNPATH_SEARCH_PATHS = ( 677 | "$(inherited)", 678 | "@executable_path/Frameworks", 679 | "@loader_path/Frameworks", 680 | ); 681 | PRODUCT_BUNDLE_IDENTIFIER = com.bolella.SpeechTranslatorTests; 682 | PRODUCT_NAME = "$(TARGET_NAME)"; 683 | SWIFT_VERSION = 5.0; 684 | TARGETED_DEVICE_FAMILY = "1,2"; 685 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SpeechTranslator.app/SpeechTranslator"; 686 | }; 687 | name = Debug; 688 | }; 689 | 0A78DABB234E293100775D47 /* Release */ = { 690 | isa = XCBuildConfiguration; 691 | baseConfigurationReference = C82BA00042C8D3F214957B2A /* Pods-SpeechTranslatorTests.release.xcconfig */; 692 | buildSettings = { 693 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 694 | BUNDLE_LOADER = "$(TEST_HOST)"; 695 | CODE_SIGN_STYLE = Automatic; 696 | INFOPLIST_FILE = SpeechTranslatorTests/Info.plist; 697 | IPHONEOS_DEPLOYMENT_TARGET = 13.1; 698 | LD_RUNPATH_SEARCH_PATHS = ( 699 | "$(inherited)", 700 | "@executable_path/Frameworks", 701 | "@loader_path/Frameworks", 702 | ); 703 | PRODUCT_BUNDLE_IDENTIFIER = com.bolella.SpeechTranslatorTests; 704 | PRODUCT_NAME = "$(TARGET_NAME)"; 705 | SWIFT_VERSION = 5.0; 706 | TARGETED_DEVICE_FAMILY = "1,2"; 707 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SpeechTranslator.app/SpeechTranslator"; 708 | }; 709 | name = Release; 710 | }; 711 | 0A78DABD234E293100775D47 /* Debug */ = { 712 | isa = XCBuildConfiguration; 713 | baseConfigurationReference = 92289BC1942069136E3DF374 /* Pods-SpeechTranslator-SpeechTranslatorUITests.debug.xcconfig */; 714 | buildSettings = { 715 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 716 | CODE_SIGN_STYLE = Automatic; 717 | INFOPLIST_FILE = SpeechTranslatorUITests/Info.plist; 718 | LD_RUNPATH_SEARCH_PATHS = ( 719 | "$(inherited)", 720 | "@executable_path/Frameworks", 721 | "@loader_path/Frameworks", 722 | ); 723 | PRODUCT_BUNDLE_IDENTIFIER = com.bolella.SpeechTranslatorUITests; 724 | PRODUCT_NAME = "$(TARGET_NAME)"; 725 | SWIFT_VERSION = 5.0; 726 | TARGETED_DEVICE_FAMILY = "1,2"; 727 | TEST_TARGET_NAME = SpeechTranslator; 728 | }; 729 | name = Debug; 730 | }; 731 | 0A78DABE234E293100775D47 /* Release */ = { 732 | isa = XCBuildConfiguration; 733 | baseConfigurationReference = 3F16CEDF79F7D6EB0120F922 /* Pods-SpeechTranslator-SpeechTranslatorUITests.release.xcconfig */; 734 | buildSettings = { 735 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 736 | CODE_SIGN_STYLE = Automatic; 737 | INFOPLIST_FILE = SpeechTranslatorUITests/Info.plist; 738 | LD_RUNPATH_SEARCH_PATHS = ( 739 | "$(inherited)", 740 | "@executable_path/Frameworks", 741 | "@loader_path/Frameworks", 742 | ); 743 | PRODUCT_BUNDLE_IDENTIFIER = com.bolella.SpeechTranslatorUITests; 744 | PRODUCT_NAME = "$(TARGET_NAME)"; 745 | SWIFT_VERSION = 5.0; 746 | TARGETED_DEVICE_FAMILY = "1,2"; 747 | TEST_TARGET_NAME = SpeechTranslator; 748 | }; 749 | name = Release; 750 | }; 751 | /* End XCBuildConfiguration section */ 752 | 753 | /* Begin XCConfigurationList section */ 754 | 0A78DA87234E292C00775D47 /* Build configuration list for PBXProject "SpeechTranslator" */ = { 755 | isa = XCConfigurationList; 756 | buildConfigurations = ( 757 | 0A78DAB4234E293100775D47 /* Debug */, 758 | 0A78DAB5234E293100775D47 /* Release */, 759 | ); 760 | defaultConfigurationIsVisible = 0; 761 | defaultConfigurationName = Release; 762 | }; 763 | 0A78DAB6234E293100775D47 /* Build configuration list for PBXNativeTarget "SpeechTranslator" */ = { 764 | isa = XCConfigurationList; 765 | buildConfigurations = ( 766 | 0A78DAB7234E293100775D47 /* Debug */, 767 | 0A78DAB8234E293100775D47 /* Release */, 768 | ); 769 | defaultConfigurationIsVisible = 0; 770 | defaultConfigurationName = Release; 771 | }; 772 | 0A78DAB9234E293100775D47 /* Build configuration list for PBXNativeTarget "SpeechTranslatorTests" */ = { 773 | isa = XCConfigurationList; 774 | buildConfigurations = ( 775 | 0A78DABA234E293100775D47 /* Debug */, 776 | 0A78DABB234E293100775D47 /* Release */, 777 | ); 778 | defaultConfigurationIsVisible = 0; 779 | defaultConfigurationName = Release; 780 | }; 781 | 0A78DABC234E293100775D47 /* Build configuration list for PBXNativeTarget "SpeechTranslatorUITests" */ = { 782 | isa = XCConfigurationList; 783 | buildConfigurations = ( 784 | 0A78DABD234E293100775D47 /* Debug */, 785 | 0A78DABE234E293100775D47 /* Release */, 786 | ); 787 | defaultConfigurationIsVisible = 0; 788 | defaultConfigurationName = Release; 789 | }; 790 | /* End XCConfigurationList section */ 791 | }; 792 | rootObject = 0A78DA84234E292C00775D47 /* Project object */; 793 | } 794 | -------------------------------------------------------------------------------- /SpeechTranslator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SpeechTranslator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SpeechTranslator.xcodeproj/xcuserdata/dbolella.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 21 | 22 | 36 | 37 | 51 | 52 | 53 | 54 | 55 | 57 | 69 | 70 | 71 | 73 | 85 | 86 | 100 | 101 | 115 | 116 | 117 | 118 | 119 | 121 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /SpeechTranslator.xcodeproj/xcuserdata/dbolella.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SpeechTranslator.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SpeechTranslator.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /SpeechTranslator.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SpeechTranslator/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SpeechTranslator 4 | // 5 | // Created by Daniel Bolella on 10/9/19. 6 | // Copyright © 2019 Daniel Bolella. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Firebase 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | FirebaseApp.configure() 20 | return true 21 | } 22 | 23 | // MARK: UISceneSession Lifecycle 24 | 25 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 26 | // Called when a new scene session is being created. 27 | // Use this method to select a configuration to create the new scene with. 28 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 29 | } 30 | 31 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 32 | // Called when the user discards a scene session. 33 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 34 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 35 | } 36 | 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /SpeechTranslator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /SpeechTranslator/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SpeechTranslator/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /SpeechTranslator/ClosedCaptioning.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClosedCaptioning.swift 3 | // SwiftUIClosedCaptioning 4 | // 5 | // Created by Daniel Bolella on 10/9/19. 6 | // Copyright © 2019 Daniel Bolella. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Speech 11 | import Firebase 12 | 13 | class ClosedCaptioning: ObservableObject { 14 | private let speechRecognizer = SFSpeechRecognizer(locale: Locale(identifier: "en-US"))! 15 | private var recognitionRequest: SFSpeechAudioBufferRecognitionRequest? 16 | private var recognitionTask: SFSpeechRecognitionTask? 17 | private let audioEngine = AVAudioEngine() 18 | 19 | @Published var captioning: String = "Waiting to Start!" 20 | @Published var translation: String = "Buon Giorno!" 21 | @Published var isPlaying: Bool = false 22 | @Published var micEnabled: Bool = false 23 | 24 | private let translator: Translator 25 | 26 | init (){ 27 | let options = TranslatorOptions(sourceLanguage: .en, targetLanguage: .it) 28 | translator = NaturalLanguage.naturalLanguage().translator(options: options) 29 | translator.downloadModelIfNeeded { (error) in 30 | guard error == nil else { return } 31 | self.micEnabled = true 32 | } 33 | } 34 | 35 | //Thanks to https://developer.apple.com/documentation/speech/recognizing_speech_in_live_audio 36 | func startRecording() throws { 37 | 38 | // Cancel the previous task if it's running. 39 | recognitionTask?.cancel() 40 | self.recognitionTask = nil 41 | 42 | // Configure the audio session for the app. 43 | let audioSession = AVAudioSession.sharedInstance() 44 | try audioSession.setCategory(.record, mode: .measurement, options: .duckOthers) 45 | try audioSession.setActive(true, options: .notifyOthersOnDeactivation) 46 | let inputNode = audioEngine.inputNode 47 | 48 | // Create and configure the speech recognition request. 49 | recognitionRequest = SFSpeechAudioBufferRecognitionRequest() 50 | guard let recognitionRequest = recognitionRequest else { fatalError("Unable to create a SFSpeechAudioBufferRecognitionRequest object") } 51 | recognitionRequest.shouldReportPartialResults = true 52 | 53 | // Keep speech recognition data on device 54 | if #available(iOS 13, *) { 55 | recognitionRequest.requiresOnDeviceRecognition = false 56 | } 57 | 58 | // Create a recognition task for the speech recognition session. 59 | // Keep a reference to the task so that it can be canceled. 60 | recognitionTask = speechRecognizer.recognitionTask(with: recognitionRequest) { result, error in 61 | var isFinal = false 62 | 63 | if let result = result { 64 | // Update the text view with the results. 65 | self.captioning = result.bestTranscription.formattedString 66 | self.translator.translate(result.bestTranscription.formattedString) { (translatedText, error) in 67 | guard error == nil, 68 | let translatedText = translatedText 69 | else { return } 70 | self.translation = translatedText 71 | } 72 | self.translate(text: result.bestTranscription.formattedString) 73 | isFinal = result.isFinal 74 | print("Text \(result.bestTranscription.formattedString)") 75 | } 76 | 77 | if error != nil || isFinal { 78 | // Stop recognizing speech if there is a problem. 79 | self.audioEngine.stop() 80 | inputNode.removeTap(onBus: 0) 81 | 82 | self.recognitionRequest = nil 83 | self.recognitionTask = nil 84 | 85 | self.isPlaying = false 86 | } 87 | } 88 | 89 | // Configure the microphone input. 90 | let recordingFormat = inputNode.outputFormat(forBus: 0) 91 | inputNode.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) { (buffer: AVAudioPCMBuffer, when: AVAudioTime) in 92 | self.recognitionRequest?.append(buffer) 93 | } 94 | 95 | audioEngine.prepare() 96 | try audioEngine.start() 97 | } 98 | 99 | func micButtonTapped(){ 100 | if audioEngine.isRunning { 101 | recognitionRequest?.endAudio() 102 | audioEngine.stop() 103 | isPlaying = false 104 | } else { 105 | do { 106 | try startRecording() 107 | isPlaying = true 108 | } catch { 109 | isPlaying = false 110 | } 111 | } 112 | } 113 | 114 | func translate(text: String){ 115 | self.translator.translate(text) { (translatedText, error) in 116 | guard error == nil, let translatedText = translatedText else { return } 117 | self.translation = translatedText 118 | } 119 | } 120 | 121 | func getPermission(){ 122 | // Asynchronously make the authorization request. 123 | SFSpeechRecognizer.requestAuthorization { authStatus in 124 | 125 | // Divert to the app's main thread so that the UI 126 | // can be updated. 127 | OperationQueue.main.addOperation { 128 | switch authStatus { 129 | case .authorized: 130 | self.micEnabled = true 131 | 132 | case .denied, .restricted, .notDetermined: 133 | self.micEnabled = false 134 | 135 | default: 136 | self.micEnabled = false 137 | } 138 | } 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /SpeechTranslator/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // SpeechTranslator 4 | // 5 | // Created by Daniel Bolella on 10/9/19. 6 | // Copyright © 2019 Daniel Bolella. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | @ObservedObject var closedCap = ClosedCaptioning() 13 | 14 | var body: some View { 15 | VStack { 16 | HStack { 17 | Text(self.closedCap.captioning) 18 | .font(.body) 19 | .truncationMode(.head) 20 | .lineLimit(4) 21 | .padding() 22 | } 23 | .frame(width: 350, height: 200) 24 | .background(Color.red.opacity(0.25)) 25 | .padding() 26 | 27 | HStack { 28 | Text(self.closedCap.translation) 29 | .font(.body) 30 | .truncationMode(.head) 31 | .lineLimit(4) 32 | .padding() 33 | } 34 | .frame(width: 350, height: 200) 35 | .background(Color.blue.opacity(0.25)) 36 | .padding() 37 | 38 | Button(action: { 39 | self.closedCap.micButtonTapped() 40 | }) { 41 | Image(systemName: !self.closedCap.micEnabled ? "mic.slash" : (self.closedCap.isPlaying ? "mic.circle.fill" : "mic.circle")) 42 | .resizable() 43 | .aspectRatio(contentMode: .fit) 44 | .frame(height: 75) 45 | .padding() 46 | } 47 | } 48 | .onAppear { 49 | self.closedCap.getPermission() 50 | } 51 | } 52 | } 53 | 54 | struct ContentView_Previews: PreviewProvider { 55 | static var previews: some View { 56 | ContentView().environment(\.colorScheme, .dark) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /SpeechTranslator/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | - 7 | REVERSED_CLIENT_ID 8 | - 9 | API_KEY 10 | - 11 | GCM_SENDER_ID 12 | - 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.bolella.SpeechTranslator 17 | PROJECT_ID 18 | - 19 | STORAGE_BUCKET 20 | - 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | - 33 | DATABASE_URL 34 | - 35 | 36 | 37 | -------------------------------------------------------------------------------- /SpeechTranslator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | FirebaseScreenReportingEnabled 22 | 23 | LSRequiresIPhoneOS 24 | 25 | NSMicrophoneUsageDescription 26 | To record speech to be translated 27 | NSSpeechRecognitionUsageDescription 28 | To use for creating the translation 29 | UIApplicationSceneManifest 30 | 31 | UIApplicationSupportsMultipleScenes 32 | 33 | UISceneConfigurations 34 | 35 | UIWindowSceneSessionRoleApplication 36 | 37 | 38 | UISceneConfigurationName 39 | Default Configuration 40 | UISceneDelegateClassName 41 | $(PRODUCT_MODULE_NAME).SceneDelegate 42 | 43 | 44 | 45 | 46 | UILaunchStoryboardName 47 | LaunchScreen 48 | UIRequiredDeviceCapabilities 49 | 50 | armv7 51 | 52 | UISupportedInterfaceOrientations 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | UISupportedInterfaceOrientations~ipad 59 | 60 | UIInterfaceOrientationPortrait 61 | UIInterfaceOrientationPortraitUpsideDown 62 | UIInterfaceOrientationLandscapeLeft 63 | UIInterfaceOrientationLandscapeRight 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /SpeechTranslator/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SpeechTranslator/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // SpeechTranslator 4 | // 5 | // Created by Daniel Bolella on 10/9/19. 6 | // Copyright © 2019 Daniel Bolella. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Create the SwiftUI view that provides the window contents. 23 | let contentView = ContentView() 24 | 25 | // Use a UIHostingController as window root view controller. 26 | if let windowScene = scene as? UIWindowScene { 27 | let window = UIWindow(windowScene: windowScene) 28 | window.rootViewController = UIHostingController(rootView: contentView) 29 | self.window = window 30 | window.makeKeyAndVisible() 31 | } 32 | } 33 | 34 | func sceneDidDisconnect(_ scene: UIScene) { 35 | // Called as the scene is being released by the system. 36 | // This occurs shortly after the scene enters the background, or when its session is discarded. 37 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 38 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 39 | } 40 | 41 | func sceneDidBecomeActive(_ scene: UIScene) { 42 | // Called when the scene has moved from an inactive state to an active state. 43 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 44 | } 45 | 46 | func sceneWillResignActive(_ scene: UIScene) { 47 | // Called when the scene will move from an active state to an inactive state. 48 | // This may occur due to temporary interruptions (ex. an incoming phone call). 49 | } 50 | 51 | func sceneWillEnterForeground(_ scene: UIScene) { 52 | // Called as the scene transitions from the background to the foreground. 53 | // Use this method to undo the changes made on entering the background. 54 | } 55 | 56 | func sceneDidEnterBackground(_ scene: UIScene) { 57 | // Called as the scene transitions from the foreground to the background. 58 | // Use this method to save data, release shared resources, and store enough scene-specific state information 59 | // to restore the scene back to its current state. 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /SpeechTranslatorTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SpeechTranslatorTests/SpeechTranslatorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SpeechTranslatorTests.swift 3 | // SpeechTranslatorTests 4 | // 5 | // Created by Daniel Bolella on 10/9/19. 6 | // Copyright © 2019 Daniel Bolella. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SpeechTranslator 11 | 12 | class SpeechTranslatorTests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /SpeechTranslatorUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SpeechTranslatorUITests/SpeechTranslatorUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SpeechTranslatorUITests.swift 3 | // SpeechTranslatorUITests 4 | // 5 | // Created by Daniel Bolella on 10/9/19. 6 | // Copyright © 2019 Daniel Bolella. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SpeechTranslatorUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | 16 | // In UI tests it is usually best to stop immediately when a failure occurs. 17 | continueAfterFailure = false 18 | 19 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 20 | } 21 | 22 | override func tearDown() { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | } 25 | 26 | func testExample() { 27 | // UI tests must launch the application that they test. 28 | let app = XCUIApplication() 29 | app.launch() 30 | 31 | // Use recording to get started writing UI tests. 32 | // Use XCTAssert and related functions to verify your tests produce the correct results. 33 | } 34 | 35 | func testLaunchPerformance() { 36 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { 37 | // This measures how long it takes to launch your application. 38 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { 39 | XCUIApplication().launch() 40 | } 41 | } 42 | } 43 | } 44 | --------------------------------------------------------------------------------