-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Complete][Phase1] #57
[Complete][Phase1] #57
Conversation
TechAlchemy423
commented
Sep 6, 2024
•
edited by jpvajda
Loading
edited by jpvajda
- To see the specific tasks where the Asana app for GitHub is being used, see below:
- https://app.asana.com/0/0/1208239081014545
@TechAlchemy423 is attempting to deploy a commit to the Deepgram Team Team on Vercel. A member of the Team first needs to authorize it. |
- should use these environmental variables in your .env file. (see discord) - The UI is changed from original UI cuz of using Agent API. So plz check the UI and if you want to maintain original UI, it will take 2 days. - I counted time for this work as 40 hrs. This is Deepgram project and I need to read Deepgram documentation to get clear understand about this API logic and integration police Previously I do not know about this Deepgram because it is not a popular framework like React.js or Next.js. This Deepgram is needed only for this project So I took some time like 2 days extra for learning. Because I work and read this documentation that I needed to work . In addition, I also spent some time to familiarize with code base. Yes, this takes only 4/5 days But I took some extra for this reason. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
app/components/Conversation.tsx
Outdated
const requestTtsAudio = useCallback( | ||
async (message: Message) => { | ||
if (!isAuthenticated) return; | ||
const start = Date.now(); | ||
const model = ttsOptions?.model ?? "aura-asteria-en"; | ||
|
||
const res = await fetch(`/api/speak?model=${model}`, { | ||
headers: { | ||
Authorization: "Bearer " + token, | ||
}, | ||
cache: "no-store", | ||
method: "POST", | ||
body: JSON.stringify(message), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is now unused (you've deleted the route.ts for this)
app/components/Conversation.tsx
Outdated
} = useChat({ | ||
id: "aura", | ||
api: "/api/brain", | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
initialMessages: [systemMessage, greetingMessage], | ||
onFinish, | ||
onResponse, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is now also unused (again, you've deleted the route.ts for this)
app/components/Conversation.tsx
Outdated
// useEffect(() => { | ||
// let keepAlive: any; | ||
// if (connection && connectionReady && !microphoneOpen) { | ||
// keepAlive = setInterval(() => { | ||
// // should stop spamming dev console when working on frontend in devmode | ||
// if (connection?.getReadyState() !== LiveConnectionState.OPEN) { | ||
// clearInterval(keepAlive); | ||
// } else { | ||
// connection.keepAlive(); | ||
// } | ||
// }, 10000); | ||
// } else { | ||
// clearInterval(keepAlive); | ||
// } | ||
|
||
// // prevent duplicate timeouts | ||
// return () => { | ||
// clearInterval(keepAlive); | ||
// }; | ||
// }, [connection, connectionReady, microphoneOpen]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more code to delete
package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ricky0123/vad-react, onnxruntime-web and openai should all have been removed by now
app/lib/constants.ts
Outdated
/** | ||
* Voice Options | ||
*/ | ||
export const voices: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these options, keep the app simple for now
app/lib/constants.ts
Outdated
|
||
// models | ||
|
||
export const models = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these too, we keep it very simple
app/components/Conversation.tsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file isn't even used anymore
* feat: added anonymous session to secure serverless endpoints (#54) * feat: upgrade from stt-llm-tts to agent-api (#57) * feat: added anonymous session to secure serverless endpoints * feat: integrated anonymous session in client for specific route * feat: added full authentication and hold some code for a dirty error * fix: recommit fixed package-lock.json and added authentication * chore: removed all redundent code and settings message --------- Co-authored-by: TechAlchmy <[email protected]> Co-authored-by: TechAlchemist <[email protected]> Co-authored-by: lukeocodes <[email protected]> * fix: style tweak * feat: add banner to click back to v1 --------- Co-authored-by: TechAlchemist <[email protected]> Co-authored-by: TechAlchemy423 <[email protected]> BREAKING CHANGE: switching APIs from STT/LLM/TTS to Agent API changes the entire purpose of this demo