- π Table of Contents
- π Overview
- π¦ Features
- π repository Structure
- βοΈ Modules
- π Getting Started
- π£ Roadmap
- π€ Contributing
- π License
- π Acknowledgments
VoiceGPT is a sophisticated AI voice assistant application built using SwiftUI and OpenAI APIs. It leverages GPT-4 models to perform voice-to-text transcriptions, generate chat-style responses, and convert responses back to speech. The app supports multiple voice types for Text-to-Speech and is compatible with iOS, macOS, and visionOS. VoiceGPT serves as an impressive demonstration of blending cutting-edge AI technology with intuitive user interface design for seamless conversational interactions.
Feature | Description | |
---|---|---|
βοΈ | Architecture | The VoiceGPT repository uses an MVVM pattern, SwiftUI for UI, and OpenAI as the back-end model service. The application follows a classic iOS project structure with main application files and Xcode project configuration files. |
π | Documentation | The README provides an overview and specifies the requirements and platform compatibilities. No other written documentation is provided. More inline comments within the code will aid understandability. |
π | Dependencies | Dependencies include OpenAIKit, SiriWaveView, Swift collections, Swift Argument Parser, Swift HTTP Types, Swift Numerics, and more. They are well-articulated in the Xcode project configuration. |
𧩠| Modularity | Code organization follows Swift best practices with a clear separation of concerns into different files: Models, Views, View-Model, and Delegates. |
π§ͺ | Testing | There are no observable test scripts or testing directories, indicating a lack of automated testing. Strong testing practices will improve code robustness and maintainability. |
β‘οΈ | Performance | The application's performance cannot be directly inferred from the repository. Nevertheless, OpenAI's GPT-3 has proven to be efficient and potent, providing reliable underlying technology. |
π | Security | No notable security measures are evidenced. However, the repository's "entitlements" mentions sandboxing and client-side networking, offering some level of security. Detailed security measures could not be inferred. |
π | Version Control | Version control is facilitated through the use of Git via GitHub, however, details regarding branching and merging strategies are not available. |
π | Integrations | Integration with the OpenAI models via the OpenAIKit is a significant part of the source code, other dependencies are integrated via Swift Package Manager. |
πΆ | Scalability | The repository seems well-structured for incremental development. However, scalability is dependent upon OpenAI's back-end service and its ability to handle increased passage generation requests. |
βββ VoiceGPT/
βββ LICENSE.MD
βββ README.MD
βββ VoiceGPT/
β βββ AppDelegate.swift
β βββ Assets.xcassets/
β β βββ AccentColor.colorset/
β β βββ AppIcon.appiconset/
β β βββ Contents.json
β βββ ContentView.swift
β βββ Models.swift
β βββ Preview Content/
β β βββ Preview Assets.xcassets/
β βββ SettingsView.swift
β βββ ViewModel.swift
β βββ VoiceGPT.entitlements
β βββ VoiceGPTApp.swift
βββ VoiceGPT.xcodeproj/
βββ project.pbxproj
βββ project.xcworkspace/
β βββ contents.xcworkspacedata
β βββ xcshareddata/
β βββ xcuserdata/
βββ xcuserdata/
βββ alfianlosari.xcuserdatad/
βββ nicojaffer.xcuserdatad/
Root
File | Summary |
---|---|
LICENSE.MD | The directory tree details a VoiceGPT iOS application with essential project files, including AppDelegate and ContentView for managing app lifecycle and user interface respectively. Assets.xcassets manages app appearance elements like accent color and icons, while SettingsView, Models, and ViewModel handle settings UI, data structures, and data management. VoiceGPTApp initiates the application. LICENSE.MD contains an open source license giving unrestricted permissions to users for copying, distributing, or modifying the project. |
README.MD | The VoiceGPT is an AI voice assistant app developed using SwiftUI and OpenAI APIs, including GPT4 Chat Completion, Whisper and TTS. It utilizes GPT-4 models, supports voice type selection for TTS and is compatible with iOS, macOS, and visionOS. Requirements include Xcode 15, iOS 17, macOS 14, visionOS 1.0, and OpenAI API Key. The software is licensed under WTFPL. |
Voicegpt.xcodeproj
File | Summary |
---|---|
project.pbxproj | The code segment provides comprehensive project settings and configurations for an application named VoiceGPT. It includes details about various Swift files and their roles, including AppDelegate.swift, ContentView.swift, Models.swift, ViewModel.swift and more. It also specifies build phases, resources, and framework dependencies. Further, it includes application entitlements, deployment targets, product identifiers, and compatibility settings. Moreover, it has references to external Swift packages like XCAOpenAIClient, SiriWaveView, and KeychainSwift. |
Project.xcworkspace
File | Summary |
---|---|
contents.xcworkspacedata | The directory structure represents a Swift-based project, named VoiceGPT. The project contains various elements including: application delegate, content views, model and view model for MVVM design pattern, settings view, and an Xcode workspace. The latter holds project data such as user settings, shared data, and workspace details. Finally, contents.xcworkspacedata file seen in the code snippet shows metadata related to the Xcode workspace. |
Xcshareddata
File | Summary |
---|---|
IDEWorkspaceChecks.plist | The code represents a directory structure for a Swift-based iOS application called VoiceGPT programmed in Xcode. Essential app components include AppDelegate.swift, ContentView.swift, SettingsView.swift, etc. It also contains model information (Models.swift), a ViewModel, and various assets. An Xcode project configuration (VoiceGPT.xcodeproj) is also present to facilitate project buildup. An XML plist informs Xcode that a 32-bit macOS compatibility warning has been computed. |
Swiftpm
File | Summary |
---|---|
Package.resolved | The code is a configuration for several Swift package dependencies in an Xcode project named VoiceGPT. It contains the repository details, revisions, and versions, for modules such as: OpenAPIKit, SiriWaveView, Swift collections, Swift Argument Parser, Swift HTTP Types, Swift Numerics, and more. This code ensures that these specific versions of the packages are used whenever the project is built. |
Xcschemes
File | Summary |
---|---|
xcschememanagement.plist | The code is a part of the VoiceGPT project written for iOS. The directory tree signifies a common iOS app structure with main application files such as AppDelegate.swift, Models.swift, ContentView.swift, ViewModel.swift, SettingsView.swift, and VoiceGPTApp.swift. Assets and their configurations are stored in.xcassets folders. Project configurations are in the VoiceGPT.xcodeproj folder. The XML code snippet indicates an Xcode schema management plist file, defining settings for building and running VoiceGPT. |
xcschememanagement.plist | The directory structure represents an Xcode project for the VoiceGPT app. Key files include AppDelegate, ContentView, Models, SettingsView, ViewModel, and SwiftUI App file. Also included are resources and configuration files, such as assets and entitlements. The XML code, a Xcode specific plist file, manages the scheme's user state for VoiceGPT, indicating the ordering of its loading or build sequence. |
Voicegpt
File | Summary |
---|---|
ViewModel.swift | The code belongs to the ViewModel of VoiceGPT, an application that performs voice-to-text transcription, generates a chat-style response using OpenAI's chat GPT, and then converts the response back to speech. It interacts with AVFoundation for audio capture and playback, OpenAIClient to interface with OpenAI, and handles recording permissions, audio metering, and task cancellation. Additionally, it manages session, player, and recorder objects including their lifecycles and state changes, contributing to the application's core functionalities. |
Models.swift | The code outlines the framework for a voice-controlled application named VoiceGPT. It declares two enumerations: VoiceType which lists different voice models, and VoiceChatState which defines the potential states of a chat interaction, such as idle, recording, processing, playing, or error handling. Various files within the project indicate that the app is developed using Swift and designed within the Xcode environment. |
VoiceGPT.entitlements | The directory tree outlines the structure and files for a Swift application named VoiceGPT. This includes Swift, assets, entitlements files, and Xcode project files. The VoiceGPT.entitlements XML code specifies application permissions, enabling app sandboxing, audio input access, read-only access to user-selected files, and client-side networking. |
AppDelegate.swift | The code is for the AppDelegate.swift file in a VoiceGPT application. It initializes a popover for the app's interface, a status bar item that shows system status, and a quit menu item. These can be toggled on/off by left/right mouse clicking. If the popover is displayed, it closes, otherwise, it shows relative to button boundaries. The quit menu is displayed when the mouse right-clicks. There's a function to terminate the application when the quit menu item is activated. |
VoiceGPTApp.swift | The provided Swift code outlines the main structure of the VoiceGPT application. It uses a SwiftUI App protocol, assigning AppDelegate as the handler for app lifecycle events. The app's main view is specified as SettingsView() contained within a WindowGroup, a container for top-level windows sharing lifecycle behavior. The directory tree underlines the architecture and includes app assets, models, view-model, views, project configurations, and user data. |
SettingsView.swift | The given directory tree is for a SwiftUI application called VoiceGPT, with Swift source files (AppDelegate.swift, ContentView.swift, Models.swift, SettingsView.swift, ViewModel.swift, and VoiceGPTApp.swift), design assets, and user-specific Xcode project data. The code in SettingsView.swift is a simple View struct, producing a text view that displays the message Settings and Preferences for VoiceGPT. |
ContentView.swift | The VoiceGPT Swift code powers a user interface for a voice-driven application. It includes interactive functionality for recording speech, processing and playing back recordings. The code dynamically changes the interface based on action states (idle, recording, processing, or error)-featuring a SiriWaveView, and control buttons to start/cancel audio capture or processing. It also offers a speech voice selection picker and handles error situations by displaying error messages. |
Preview assets.xcassets
File | Summary |
---|---|
[Contents.json](https://github.com/plyght/VoiceGPT/blob/main/VoiceGPT/Preview Content/Preview Assets.xcassets/Contents.json) | The code represents a directory structure for a Swift iOS application named VoiceGPT. The application includes README, LICENSE files, Swift scripts handling App delegates, content view, settings view, models, and view model, with provision for entitlements, assets (like colors/icons), and app-specific data. A special Preview Content section is present for asset previews. The Xcode project data is also housed. Lastly, the JSON snippet defines meta-information for Xcode regarding version and author for preview assets. |
Assets.xcassets
File | Summary |
---|---|
Contents.json | The given code and directory structure represent the VoiceGPT application, a Swift-based iOS project. The application includes Swift files for managing app delegate, content view, settings, and a view model. The Assets.xcassets and Preview Assets.xcassets directories hold app resources with their meta-detail defined in Contents.json. There are user-specific project settings stored in the.xcuserdatad directories under the VoiceGPT.xcodeproj. |
Appicon.appiconset
File | Summary |
---|---|
Contents.json | The code specifies a collection of different sized app icons for an AI Voice Assistant application named VoiceGPT. Each item in the collection holds information about the filename of the icon image, the platform the icon is intended for (iOS or Mac), its size, and resolution scale. The icons convey a minimalistic design representing an AI brain. |
Accentcolor.colorset
File | Summary |
---|---|
Contents.json | This directory tree represents the VoiceGPT project's file structure of an iOS Swift application. It includes information about the Xcode project (.xcodeproj), app resources such as assets (.xcassets) and universal color settings (Contents.json in AccentColor.colorset), and swift files (.swift) for application's delegate, view designs, models, and view models. User specific settings are in.xcuserdatad directories. |
Dependencies
Please ensure you have the following dependencies installed on your system:
- βΉοΈ Dependency 1
- βΉοΈ Dependency 2
- βΉοΈ ...
- Clone the VoiceGPT repository:
git clone https://github.com/plyght/VoiceGPT
- Change to the project directory:
cd VoiceGPT
- Install the dependencies:
swift build
.build/debug/myapp
swift test
βΉοΈ Task 1: Implement X
βΉοΈ Task 2: Implement Y
βΉοΈ ...
Contributions are welcome! Here are several ways you can contribute:
- Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Report Issues: Submit bugs found or log feature requests for PLYGHT.
Click to expand
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a Git client.
git clone <your-forked-repo-url>
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear and concise message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
Once your PR is reviewed and approved, it will be merged into the main branch.
This project is protected under the WTFPL License. For more details, refer to the LICENSE file.
- List any resources, contributors, inspiration, etc. here.