Skip to content

Commit

Permalink
Agent: Update websocket host/port (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
juberti authored Nov 18, 2023
1 parent 6f27bf8 commit 574f2f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/voice/src/app/agent/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -565,14 +565,15 @@ export class WebRtcChatManager implements ChatManager {
}
warmup() {
const isLocalHost = window.location.hostname === 'localhost';
const url = !isLocalHost ? 'wss://prod-voice-pgaenaxiea-uw.a.run.app' : 'ws://localhost:8080';
const url = !isLocalHost ? 'wss://wsapi.fixie.ai' : 'ws://localhost:8100';
this.socket = new WebSocket(url);
this.socket.onopen = () => this.handleSocketOpen();
this.socket.onmessage = (event) => this.handleSocketMessage(event);
this.socket.onclose = (event) => this.handleSocketClose(event);
}
async start() {
console.log('[chat] starting');
this.audioElement.play();
const localTracks = await createLocalTracks({ audio: true, video: false });
this.localAudioTrack = localTracks[0] as LocalAudioTrack;
console.log('[chat] got mic stream');
Expand All @@ -582,7 +583,6 @@ export class WebRtcChatManager implements ChatManager {
this.room?.localParticipant.publishData(this.textEncoder.encode(JSON.stringify(obj)), DataPacket_Kind.RELIABLE);
}, 5000);
this.maybePublishLocalAudio();
this.audioElement.play();
this.changeState(ChatManagerState.LISTENING);
}
async stop() {
Expand Down

4 comments on commit 574f2f8

@vercel
Copy link

@vercel vercel bot commented on 574f2f8 Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-voice – ./packages/voice

voice.fixie.ai
ai-jsx-voice-git-main-fixie-ai.vercel.app
ai-jsx-voice-fixie-ai.vercel.app
ai-jsx-voice.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 574f2f8 Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-docs – ./packages/docs

ai-jsx-docs-git-main-fixie-ai.vercel.app
docs.ai-jsx.com
ai-jsx-docs-fixie-ai.vercel.app
ai-jsx-docs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 574f2f8 Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-tutorial-nextjs – ./packages/tutorial-nextjs

ai-jsx-tutorial-nextjs.vercel.app
ai-jsx-tutorial-nextjs-git-main-fixie-ai.vercel.app
ai-jsx-tutorial-nextjs-fixie-ai.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 574f2f8 Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-nextjs-demo – ./packages/nextjs-demo

ai-jsx-nextjs-demo-fixie-ai.vercel.app
ai-jsx-nextjs-demo-git-main-fixie-ai.vercel.app
ai-jsx-nextjs-demo.vercel.app

Please sign in to comment.