Skip to content

Commit

Permalink
hot garb
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Oct 11, 2024
1 parent cd9bfa0 commit 51beca2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/SimliClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ export class SimliClient extends EventEmitter {

this.dc.addEventListener('message', (evt) => {
console.log('Received message: ', evt.data)
if (evt.data === 'Session Intialization not done, Ignoring audio') {
this.emit('failed')
}
})
}

Expand Down
8 changes: 4 additions & 4 deletions src/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const oai =
import.meta.env.VITE_OPENAI_API_KEY ?? 'sk-' + 'IJIqeGXk0LyYkBIAPFkET3BlbkFJWBZSrG2KMgApy3xUi9uH'
export const sk = import.meta.env.VITE_SIMLI_API_KEY ?? 'dlqhn6n14udwl4z3v66pn'
import.meta.env.VITE_OPENAI_API_KEY ?? ('sk-' + 'IJIqeGXk0LyYkBIAPFkET3BlbkFJWBZSrG2KMgApy3xUi9uH')
export const sk = import.meta.env?.VITE_SIMLI_API_KEY ??
export const e11 =

Check failure on line 4 in src/constants.tsx

View workflow job for this annotation

GitHub Actions / build-and-deploy

Expression expected.
import.meta.env.VITE_ELEVENLABS_API_KEY ??
'sk_' + 'db6b7ebae17ee002ca26b741b55ae505545f5235149999f4'
import.meta.env?.VITE_ELEVENLABS_API_KEY ??
('sk_' + 'db6b7ebae17ee002ca26b741b55ae505545f5235149999f4')
3 changes: 2 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ const App = () => {

const initializeSimliClient = useCallback(() => {
if (videoRef.current && audioRef.current) {
console.log('sk', sk)
const SimliConfig = {
apiKey: sk as string,
apiKey: (sk as string) ?? 'dlqhn6n14udwl4z3v66pn',
faceID: SIMLI_FACE_ID,
handleSilence: true,
videoRef: videoRef,
Expand Down

0 comments on commit 51beca2

Please sign in to comment.