chatty-bear's People
Forkers
tomrailiochatty-bear's Issues
Recognizing when the user stops speaking
This could be used to trigger microphone recording and sending the current data to the server
Record audio from the user
Explanations for the underlying technologies
https://web.dev/media-recording-audio/
An example how to record audio from user, and how to send it to server
https://stackoverflow.com/questions/67229656/how-to-record-mic-from-client-then-send-to-server
Interface considerations
As the task is for a emergent user interface, the interaction between the user and the service should be the main focus. We want to enable the user to have a conversation with an AI, so making the interaction as close to a real conversation is essential.
Technically, we can have multiple "tiers" of working interactions, with the latency between each participant's response improving further on
Approach 1:
- Record audio file from user on client
- Send audio file from client to our server
- Send audio file from our server to google
- Receive text response from google
- Send text response to ChatGPT
- Receive text response from ChatGPT
- Send text response to google
- Receive audio file from google
- Send audio file to client
- Play it back to user
We could technically simplify this to a possible optimum of
Approach 2:
- Initiate audio capture on client
- live-stream microphone feed to our server
- forward live-stream to google
- receive text from google
- Send text response to ChatGPT
- Receive text response from ChatGPT
- send text response to google
- receive audio file from google
- stream audio straight to user
Technically, this probably requires the use of websockets for data transfer instead of HTTP requests
Some inspiration:
https://github.com/vin-ni/Google-Cloud-Speech-Node-Socket-Playground
https://www.leeboonstra.dev/chatbots/building-your-own-voice-ai-4/
Receive responses for a given text prompt
This seems like a good way to programmatically interact with ChatGPT
Receive audio data from the client
this could be a good example interface between the client and the server
https://stackoverflow.com/questions/67229656/how-to-record-mic-from-client-then-send-to-server
Engineer a proper prompt for ChatGPT
Example discussion:
Prompt: You should act as a psychologist, who is empathetic and tries to help me with anything I ask for. You should ask follow-up questions when appropriate, and try to have a productive discussion with me. Do not talk about being an AI. The discussion starts here: I am having problems with my motivation for studying
Response: Can you tell me more about what specifically is causing you to struggle with motivation for studying?
Prompt: I think the courses might be a bit hard for me currently
Response: If you're feeling overwhelmed, consider reaching out to your instructor or tutor for extra support. You can also break down course materials into smaller, manageable tasks or try studying with a group.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.