Skip to content

Commit

Permalink
Allow asrModel to be specified via URL params (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
juberti authored Jan 4, 2024
1 parent bd0a246 commit af8be60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/voice/src/app/agent/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export interface ChatManagerInit {
model: string;
agentId: string;
docs: boolean;
asrModel?: string;
asrLanguage?: string;
ttsModel?: string;
ttsVoice?: string;
Expand Down Expand Up @@ -638,6 +639,7 @@ export class WebRtcChatManager implements ChatManager {
params: {
asr: {
provider: this.params.asrProvider,
model: this.params.asrModel,
language: this.params.asrLanguage,
},
tts: {
Expand Down
2 changes: 2 additions & 0 deletions packages/voice/src/app/agent/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ const AgentPageComponent: React.FC = () => {
const tapOrClick = typeof window != 'undefined' && 'ontouchstart' in window ? 'Tap' : 'Click';
const idleText = `${tapOrClick} anywhere to start!`;
const asrProvider = searchParams.get('asr') || DEFAULT_ASR_PROVIDER;
const asrModel = searchParams.get('asrModel') || undefined;
const asrLanguage = searchParams.get('asrLanguage') || undefined;
const ttsProvider = searchParams.get('tts') || DEFAULT_TTS_PROVIDER;
const ttsModel = searchParams.get('ttsModel') || undefined;
Expand All @@ -254,6 +255,7 @@ const AgentPageComponent: React.FC = () => {
console.log(`[page] init asr=${asrProvider} tts=${ttsProvider} llm=${model} agent=${agentId} docs=${docs}`);
const manager = createChatManager({
asrProvider,
asrModel,
asrLanguage,
ttsProvider,
ttsModel,
Expand Down

4 comments on commit af8be60

@vercel
Copy link

@vercel vercel bot commented on af8be60 Jan 4, 2024

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

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

@vercel
Copy link

@vercel vercel bot commented on af8be60 Jan 4, 2024

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
ai-jsx-docs.vercel.app
ai-jsx-docs-fixie-ai.vercel.app
docs.ai-jsx.com

@vercel
Copy link

@vercel vercel bot commented on af8be60 Jan 4, 2024

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.vercel.app
ai-jsx-nextjs-demo-git-main-fixie-ai.vercel.app

@vercel
Copy link

@vercel vercel bot commented on af8be60 Jan 4, 2024

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-fixie-ai.vercel.app
ai-jsx-tutorial-nextjs-git-main-fixie-ai.vercel.app
ai-jsx-tutorial-nextjs.vercel.app

Please sign in to comment.