Repository: Olivia-li/humane.watch
Branch: main
Commit: 8fc3ba96446e
Files: 17
Total size: 28.0 KB
Directory structure:
gitextract_quibif4k/
├── .gitignore
├── .python-version
├── README.md
├── flask_server.py
├── humane Watch App/
│ ├── Assets.xcassets/
│ │ ├── AccentColor.colorset/
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset/
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── AudioRecorder.swift
│ ├── ContentView.swift
│ ├── DataExtension.swift
│ ├── Preview Content/
│ │ └── Preview Assets.xcassets/
│ │ └── Contents.json
│ └── humaneApp.swift
├── humane-Watch-App-Info.plist
└── humane.xcodeproj/
├── project.pbxproj
├── project.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ └── IDEWorkspaceChecks.plist
└── xcuserdata/
└── oliviali.xcuserdatad/
└── xcschemes/
└── xcschememanagement.plist
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.env
*.m4a
================================================
FILE: .python-version
================================================
3.11
================================================
FILE: README.md
================================================
# Humane Watch App
## Prerequisites
- macOS with the latest version of Xcode installed.
- Python 3 and Flask installed for the server side.
- An Apple Watch or an iOS simulator that supports watchOS.
## Setting Up the Xcode Project
1. **Clone the Repository**: Clone the project repository to your local machine. `git clone https://github.com/Olivia-li/humane.watch.git`
2. **Open the Project in Xcode**:
- Navigate to the cloned directory.
- Open the `.xcodeproj` file in Xcode.
3. **Configure the Project**:
- Select your Apple Watch target in Xcode.
- Configure the signing with your Apple Developer account.
4. **Build the Application**:
- Select your target device (Apple Watch or Simulator).
- Click on the ‘Build’ button (Play icon) in Xcode to compile the project.
## Running the Flask Server
1. **Install dependencies**: `pip install flask`
2. **Start the Flask Server**: `python flask_server.py`
================================================
FILE: flask_server.py
================================================
from flask import Flask, request, send_file
from dotenv import load_dotenv
from openai import OpenAI
import whisper
import os
import time
app = Flask(__name__)
@app.route('/api', methods=['POST'])
def upload_file():
start_time = time.time()
if 'file' not in request.files:
app.logger.error('No file part in the request')
return 'No file part', 400
file = request.files['file']
if file.filename == '':
app.logger.error('No selected file')
return 'No selected file', 400
download_start = time.time()
path = os.path.join(os.getcwd(), "recording.m4a")
file.save(path)
download_end = time.time()
transcribe_start = time.time()
result = model.transcribe(path)
transcribe_end = time.time()
prompt = result["text"]
gpt4_start = time.time()
completion = client.chat.completions.create(
model="gpt-4-1106-preview",
max_tokens=80,
messages=[
{"role": "system", "content": "You are a helpful assistant. Give only short answers. Be extremely concise. If you hear a language that's not in English. Translate it to English."},
{"role": "user", "content": prompt}
]
)
gpt4_end = time.time()
print(completion.choices[0].message.content)
upload_start = time.time()
response = client.audio.speech.create(
model="tts-1",
voice="alloy",
response_format="aac",
input=completion.choices[0].message.content
)
response.stream_to_file("output.m4a")
upload_end = time.time()
total_time = time.time() - start_time
print(f"Download Time: {download_end - download_start:.2f} seconds")
print(f"Transcribe Time: {transcribe_end - transcribe_start:.2f} seconds")
print(f"GPT-4 Response Time: {gpt4_end - gpt4_start:.2f} seconds")
print(f"Upload Time: {upload_end - upload_start:.2f} seconds")
print(f"Total Time: {total_time:.2f} seconds")
return send_file("output.m4a", mimetype="audio/m4a")
if __name__ == '__main__':
load_dotenv()
client = OpenAI()
model = whisper.load_model("tiny")
app.run(host='0.0.0.0', port=3000, debug=True)
================================================
FILE: humane Watch App/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: humane Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"platform" : "watchos",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: humane Watch App/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: humane Watch App/AudioRecorder.swift
================================================
import WatchKit
import Foundation
import AVFoundation
import Combine
class AudioRecorder: NSObject, ObservableObject, AVAudioRecorderDelegate {
private var audioRecorder: AVAudioRecorder?
private var audioPlayer: AVAudioPlayer?
@Published var isRecording = false
override init() {
super.init()
setupAudioRecorder()
}
private func setupAudioRecorder() {
let audioSession = AVAudioSession.sharedInstance()
do {
try audioSession.setCategory(.playAndRecord, mode: .default)
try audioSession.setActive(true)
let timestamp = DateFormatter.localizedString(from: Date(), dateStyle: .medium, timeStyle: .long)
let uniqueFilename = "recording_\(timestamp).m4a"
let audioFilename = getDocumentsDirectory().appendingPathComponent(uniqueFilename)
let settings = [
AVFormatIDKey: Int(kAudioFormatMPEG4AAC),
AVSampleRateKey: 12000,
AVNumberOfChannelsKey: 1,
AVEncoderAudioQualityKey: AVAudioQuality.high.rawValue
]
audioRecorder = try AVAudioRecorder(url: audioFilename, settings: settings)
audioRecorder?.delegate = self
} catch {
print("Failed to set up audio recorder: \(error)")
}
}
func startRecording() {
setupAudioRecorder()
audioRecorder?.record()
isRecording = true
}
func stopRecording() {
audioRecorder?.stop()
isRecording = false
}
func audioRecorderDidFinishRecording(_ recorder: AVAudioRecorder, successfully flag: Bool) {
if !flag {
print("Recording finished unsuccessfully")
} else {
uploadAudioFile()
}
}
private func getDocumentsDirectory() -> URL {
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
return paths[0]
}
func uploadAudioFile() {
guard let audioURL = audioRecorder?.url else { return }
let url = URL(string: "http://localhost:3000/api")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
let boundary = "Boundary-\(UUID().uuidString)"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
var data = Data()
data.append("\r\n--\(boundary)\r\n".data(using: .utf8)!)
data.append("Content-Disposition: form-data; name=\"file\"; filename=\"\(audioURL.lastPathComponent)\"\r\n".data(using: .utf8)!)
data.append("Content-Type: audio/m4a\r\n\r\n".data(using: .utf8)!)
if let audioData = try? Data(contentsOf: audioURL) {
data.append(audioData)
}
data.append("\r\n--\(boundary)--\r\n".data(using: .utf8)!)
let task = URLSession.shared.uploadTask(with: request, from: data) { [weak self] data, response, error in
if let error = error {
print("Upload error: \(error)")
return
}
guard let responseData = data else {
print("No data received")
return
}
self?.playAudio(data: responseData)
}
task.resume()
}
private func playAudio(data: Data) {
DispatchQueue.main.async {
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .voicePrompt)
try AVAudioSession.sharedInstance().setActive(true)
self.audioPlayer = try AVAudioPlayer(data: data)
self.audioPlayer?.prepareToPlay()
self.audioPlayer?.volume = 1.0
self.audioPlayer?.play()
} catch {
print("Audio playback error: \(error)")
}
}
}
}
================================================
FILE: humane Watch App/ContentView.swift
================================================
import SwiftUI
struct ContentView: View {
@StateObject var recordingManager = AudioRecorder()
var body: some View {
VStack {
if recordingManager.isRecording {
Button("Stop Recording") {
recordingManager.stopRecording()
}
} else {
Button("Start Recording") {
recordingManager.startRecording()
}
}
}
}
}
================================================
FILE: humane Watch App/DataExtension.swift
================================================
//
// DataExtension.swift
// humane Watch App
//
// Created by Olivia Li on 11/15/23.
//
import Foundation
extension Data {
mutating func append(_ string: String) {
if let data = string.data(using: .utf8) {
append(data)
}
}
}
================================================
FILE: humane Watch App/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: humane Watch App/humaneApp.swift
================================================
//
// humaneApp.swift
// humane Watch App
//
// Created by Olivia Li on 11/15/23.
//
import SwiftUI
@main
struct humane_Watch_AppApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: humane-Watch-App-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).HostingController</string>
</dict>
</plist>
================================================
FILE: humane.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
C7FB2F7F2B05AB8D004EA487 /* humane Watch App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = C7FB2F7E2B05AB8D004EA487 /* humane Watch App.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
C7FB2F842B05AB8D004EA487 /* humaneApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7FB2F832B05AB8D004EA487 /* humaneApp.swift */; };
C7FB2F862B05AB8D004EA487 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7FB2F852B05AB8D004EA487 /* ContentView.swift */; };
C7FB2F882B05AB8E004EA487 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C7FB2F872B05AB8E004EA487 /* Assets.xcassets */; };
C7FB2F8B2B05AB8E004EA487 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C7FB2F8A2B05AB8E004EA487 /* Preview Assets.xcassets */; };
C7FB2F992B05B2C7004EA487 /* AudioRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7FB2F982B05B2C7004EA487 /* AudioRecorder.swift */; };
C7FB2F9D2B05CCF2004EA487 /* DataExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7FB2F9C2B05CCF2004EA487 /* DataExtension.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
C7FB2F802B05AB8D004EA487 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C7FB2F722B05AB8D004EA487 /* Project object */;
proxyType = 1;
remoteGlobalIDString = C7FB2F7D2B05AB8D004EA487;
remoteInfo = "humane Watch App";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
C7FB2F912B05AB8E004EA487 /* Embed Watch Content */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
dstSubfolderSpec = 16;
files = (
C7FB2F7F2B05AB8D004EA487 /* humane Watch App.app in Embed Watch Content */,
);
name = "Embed Watch Content";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
C7FB2F782B05AB8D004EA487 /* humane.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = humane.app; sourceTree = BUILT_PRODUCTS_DIR; };
C7FB2F7E2B05AB8D004EA487 /* humane Watch App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "humane Watch App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
C7FB2F832B05AB8D004EA487 /* humaneApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = humaneApp.swift; sourceTree = "<group>"; };
C7FB2F852B05AB8D004EA487 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
C7FB2F872B05AB8E004EA487 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
C7FB2F8A2B05AB8E004EA487 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
C7FB2F962B05B193004EA487 /* libAXSpeechManager.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libAXSpeechManager.tbd; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS10.0.sdk/usr/lib/libAXSpeechManager.tbd; sourceTree = DEVELOPER_DIR; };
C7FB2F982B05B2C7004EA487 /* AudioRecorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecorder.swift; sourceTree = "<group>"; };
C7FB2F9A2B05B2F6004EA487 /* CoreML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreML.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS10.0.sdk/System/Library/Frameworks/CoreML.framework; sourceTree = DEVELOPER_DIR; };
C7FB2F9C2B05CCF2004EA487 /* DataExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataExtension.swift; sourceTree = "<group>"; };
C7FB2FA02B05E57B004EA487 /* humane-Watch-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "humane-Watch-App-Info.plist"; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
C7FB2F7B2B05AB8D004EA487 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
C7FB2F712B05AB8D004EA487 = {
isa = PBXGroup;
children = (
C7FB2F822B05AB8D004EA487 /* humane Watch App */,
C7FB2F792B05AB8D004EA487 /* Products */,
C7FB2F952B05B185004EA487 /* Frameworks */,
);
sourceTree = "<group>";
};
C7FB2F792B05AB8D004EA487 /* Products */ = {
isa = PBXGroup;
children = (
C7FB2F782B05AB8D004EA487 /* humane.app */,
C7FB2F7E2B05AB8D004EA487 /* humane Watch App.app */,
);
name = Products;
sourceTree = "<group>";
};
C7FB2F822B05AB8D004EA487 /* humane Watch App */ = {
isa = PBXGroup;
children = (
C7FB2FA02B05E57B004EA487 /* humane-Watch-App-Info.plist */,
C7FB2F832B05AB8D004EA487 /* humaneApp.swift */,
C7FB2F852B05AB8D004EA487 /* ContentView.swift */,
C7FB2F982B05B2C7004EA487 /* AudioRecorder.swift */,
C7FB2F9C2B05CCF2004EA487 /* DataExtension.swift */,
C7FB2F872B05AB8E004EA487 /* Assets.xcassets */,
C7FB2F892B05AB8E004EA487 /* Preview Content */,
);
path = "humane Watch App";
sourceTree = "<group>";
};
C7FB2F892B05AB8E004EA487 /* Preview Content */ = {
isa = PBXGroup;
children = (
C7FB2F8A2B05AB8E004EA487 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
C7FB2F952B05B185004EA487 /* Frameworks */ = {
isa = PBXGroup;
children = (
C7FB2F9A2B05B2F6004EA487 /* CoreML.framework */,
C7FB2F962B05B193004EA487 /* libAXSpeechManager.tbd */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
C7FB2F772B05AB8D004EA487 /* humane */ = {
isa = PBXNativeTarget;
buildConfigurationList = C7FB2F922B05AB8E004EA487 /* Build configuration list for PBXNativeTarget "humane" */;
buildPhases = (
C7FB2F762B05AB8D004EA487 /* Resources */,
C7FB2F912B05AB8E004EA487 /* Embed Watch Content */,
);
buildRules = (
);
dependencies = (
C7FB2F812B05AB8D004EA487 /* PBXTargetDependency */,
);
name = humane;
productName = humane;
productReference = C7FB2F782B05AB8D004EA487 /* humane.app */;
productType = "com.apple.product-type.application.watchapp2-container";
};
C7FB2F7D2B05AB8D004EA487 /* humane Watch App */ = {
isa = PBXNativeTarget;
buildConfigurationList = C7FB2F8E2B05AB8E004EA487 /* Build configuration list for PBXNativeTarget "humane Watch App" */;
buildPhases = (
C7FB2F7A2B05AB8D004EA487 /* Sources */,
C7FB2F7B2B05AB8D004EA487 /* Frameworks */,
C7FB2F7C2B05AB8D004EA487 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "humane Watch App";
productName = "humane Watch App";
productReference = C7FB2F7E2B05AB8D004EA487 /* humane Watch App.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
C7FB2F722B05AB8D004EA487 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1500;
LastUpgradeCheck = 1500;
TargetAttributes = {
C7FB2F772B05AB8D004EA487 = {
CreatedOnToolsVersion = 15.0.1;
};
C7FB2F7D2B05AB8D004EA487 = {
CreatedOnToolsVersion = 15.0.1;
};
};
};
buildConfigurationList = C7FB2F752B05AB8D004EA487 /* Build configuration list for PBXProject "humane" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = C7FB2F712B05AB8D004EA487;
productRefGroup = C7FB2F792B05AB8D004EA487 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C7FB2F772B05AB8D004EA487 /* humane */,
C7FB2F7D2B05AB8D004EA487 /* humane Watch App */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
C7FB2F762B05AB8D004EA487 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C7FB2F7C2B05AB8D004EA487 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C7FB2F8B2B05AB8E004EA487 /* Preview Assets.xcassets in Resources */,
C7FB2F882B05AB8E004EA487 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
C7FB2F7A2B05AB8D004EA487 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C7FB2F992B05B2C7004EA487 /* AudioRecorder.swift in Sources */,
C7FB2F9D2B05CCF2004EA487 /* DataExtension.swift in Sources */,
C7FB2F862B05AB8D004EA487 /* ContentView.swift in Sources */,
C7FB2F842B05AB8D004EA487 /* humaneApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
C7FB2F812B05AB8D004EA487 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C7FB2F7D2B05AB8D004EA487 /* humane Watch App */;
targetProxy = C7FB2F802B05AB8D004EA487 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
C7FB2F8C2B05AB8E004EA487 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
C7FB2F8D2B05AB8E004EA487 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
};
name = Release;
};
C7FB2F8F2B05AB8E004EA487 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"humane Watch App/Preview Content\"";
DEVELOPMENT_TEAM = RSR8K28Z58;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "humane-Watch-App-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = humane;
INFOPLIST_KEY_LSApplicationCategoryType = "";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "Need access to microphone to communicate with the AI";
INFOPLIST_KEY_NSSpeechRecognitionUsageDescription = "Need to recognize speech to create AI assistant answers";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKWatchOnly = YES;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.oliviali.humane.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 10.0;
};
name = Debug;
};
C7FB2F902B05AB8E004EA487 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"humane Watch App/Preview Content\"";
DEVELOPMENT_TEAM = RSR8K28Z58;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "humane-Watch-App-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = humane;
INFOPLIST_KEY_LSApplicationCategoryType = "";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "Need access to microphone to communicate with the AI";
INFOPLIST_KEY_NSSpeechRecognitionUsageDescription = "Need to recognize speech to create AI assistant answers";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKWatchOnly = YES;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.oliviali.humane.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 10.0;
};
name = Release;
};
C7FB2F932B05AB8E004EA487 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = RSR8K28Z58;
INFOPLIST_KEY_CFBundleDisplayName = humane;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.oliviali.humane;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
C7FB2F942B05AB8E004EA487 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = RSR8K28Z58;
INFOPLIST_KEY_CFBundleDisplayName = humane;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.oliviali.humane;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C7FB2F752B05AB8D004EA487 /* Build configuration list for PBXProject "humane" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C7FB2F8C2B05AB8E004EA487 /* Debug */,
C7FB2F8D2B05AB8E004EA487 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C7FB2F8E2B05AB8E004EA487 /* Build configuration list for PBXNativeTarget "humane Watch App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C7FB2F8F2B05AB8E004EA487 /* Debug */,
C7FB2F902B05AB8E004EA487 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C7FB2F922B05AB8E004EA487 /* Build configuration list for PBXNativeTarget "humane" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C7FB2F932B05AB8E004EA487 /* Debug */,
C7FB2F942B05AB8E004EA487 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = C7FB2F722B05AB8D004EA487 /* Project object */;
}
================================================
FILE: humane.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
================================================
FILE: humane.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: humane.xcodeproj/xcuserdata/oliviali.xcuserdatad/xcschemes/xcschememanagement.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>humane Watch App.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
gitextract_quibif4k/
├── .gitignore
├── .python-version
├── README.md
├── flask_server.py
├── humane Watch App/
│ ├── Assets.xcassets/
│ │ ├── AccentColor.colorset/
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset/
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── AudioRecorder.swift
│ ├── ContentView.swift
│ ├── DataExtension.swift
│ ├── Preview Content/
│ │ └── Preview Assets.xcassets/
│ │ └── Contents.json
│ └── humaneApp.swift
├── humane-Watch-App-Info.plist
└── humane.xcodeproj/
├── project.pbxproj
├── project.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ └── IDEWorkspaceChecks.plist
└── xcuserdata/
└── oliviali.xcuserdatad/
└── xcschemes/
└── xcschememanagement.plist
SYMBOL INDEX (1 symbols across 1 files) FILE: flask_server.py function upload_file (line 11) | def upload_file():
Condensed preview — 17 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (33K chars).
[
{
"path": ".gitignore",
"chars": 10,
"preview": ".env\n*.m4a"
},
{
"path": ".python-version",
"chars": 5,
"preview": "3.11\n"
},
{
"path": "README.md",
"chars": 917,
"preview": "# Humane Watch App\n\n## Prerequisites\n\n- macOS with the latest version of Xcode installed.\n- Python 3 and Flask installed"
},
{
"path": "flask_server.py",
"chars": 2170,
"preview": "from flask import Flask, request, send_file\nfrom dotenv import load_dotenv\nfrom openai import OpenAI\nimport whisper\nimpo"
},
{
"path": "humane Watch App/Assets.xcassets/AccentColor.colorset/Contents.json",
"chars": 123,
"preview": "{\n \"colors\" : [\n {\n \"idiom\" : \"universal\"\n }\n ],\n \"info\" : {\n \"author\" : \"xcode\",\n \"version\" : 1\n }"
},
{
"path": "humane Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 181,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"platform\" : \"watchos\",\n \"size\" : \"1024x1024\"\n }\n ],\n"
},
{
"path": "humane Watch App/Assets.xcassets/Contents.json",
"chars": 63,
"preview": "{\n \"info\" : {\n \"author\" : \"xcode\",\n \"version\" : 1\n }\n}\n"
},
{
"path": "humane Watch App/AudioRecorder.swift",
"chars": 3856,
"preview": "import WatchKit\nimport Foundation\nimport AVFoundation\nimport Combine\n\n\nclass AudioRecorder: NSObject, ObservableObject, "
},
{
"path": "humane Watch App/ContentView.swift",
"chars": 472,
"preview": "import SwiftUI\n\nstruct ContentView: View {\n @StateObject var recordingManager = AudioRecorder()\n\n var body: some V"
},
{
"path": "humane Watch App/DataExtension.swift",
"chars": 267,
"preview": "//\n// DataExtension.swift\n// humane Watch App\n//\n// Created by Olivia Li on 11/15/23.\n//\n\nimport Foundation\n\nextensio"
},
{
"path": "humane Watch App/Preview Content/Preview Assets.xcassets/Contents.json",
"chars": 63,
"preview": "{\n \"info\" : {\n \"author\" : \"xcode\",\n \"version\" : 1\n }\n}\n"
},
{
"path": "humane Watch App/humaneApp.swift",
"chars": 239,
"preview": "//\n// humaneApp.swift\n// humane Watch App\n//\n// Created by Olivia Li on 11/15/23.\n//\n\nimport SwiftUI\n\n@main\nstruct hu"
},
{
"path": "humane-Watch-App-Info.plist",
"chars": 285,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "humane.xcodeproj/project.pbxproj",
"chars": 19336,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "humane.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 135,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:\">\n </FileRef"
},
{
"path": "humane.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "humane.xcodeproj/xcuserdata/oliviali.xcuserdatad/xcschemes/xcschememanagement.plist",
"chars": 351,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
}
]
About this extraction
This page contains the full source code of the Olivia-li/humane.watch GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 17 files (28.0 KB), approximately 9.2k tokens, and a symbol index with 1 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.