Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions app/assistant/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
useLocalParticipant,
useParticipantTracks,
useRoomContext,
LiveKitRoom,
VideoTrack,
} from '@livekit/react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
Expand All @@ -30,23 +31,21 @@ import {
} from '@livekit/components-react';
import { useConnection } from '@/hooks/useConnection';

const LIVEKIT_URL = 'wss://speechplus-vs6wggn9.livekit.cloud';
const LIVEKIT_TOKEN = 'eyJleHAiOjE3NjkyOTA3NTIsImlkZW50aXR5IjoiaXNpYWgiLCJpc3MiOiJBUEkzUDg4RmZnanRlQzMiLCJuYmYiOjE3NjkyODk4NTIsInN1YiI6ImlzaWFoIiwidmlkZW8iOnsiY2FuUHVibGlzaCI6dHJ1ZSwiY2FuUHVibGlzaERhdGEiOnRydWUsImNhblN1YnNjcmliZSI6dHJ1ZSwicm9vbSI6IlJvb20iLCJyb29tSm9pbiI6dHJ1ZX19'
export default function AssistantScreen() {
// Start the audio session first.
useEffect(() => {
let start = async () => {
await AudioSession.startAudioSession();
};

start();
return () => {
AudioSession.stopAudioSession();
};
}, []);

return (
<SafeAreaView>
<RoomView />
</SafeAreaView>
<LiveKitRoom
serverUrl={LIVEKIT_URL}
token={LIVEKIT_TOKEN}
connect={true}
audio={true}
video={false}
>
<SafeAreaView style={{ flex: 1 }}>
<RoomView />
</SafeAreaView>
</LiveKitRoom>
);
}

Expand Down
7 changes: 4 additions & 3 deletions hooks/useConnection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createContext, useContext, useMemo, useState } from 'react';
import { SessionProvider, useSession } from '@livekit/components-react';

// TODO: Add your Sandbox ID here
const sandboxID = '';
const sandboxID = 'speechplus-1fjqy1';

// The name of the agent you wish to be dispatched.
const agentName = undefined
Expand All @@ -13,15 +13,16 @@ const agentName = undefined
// and using one of your API Keys to generate a token with custom TTL and permissions.

// For use without a token server.
const hardcodedUrl = '';
const hardcodedToken = '';
const hardcodedUrl = 'wss://speechplus-vs6wggn9.livekit.cloud';
const hardcodedToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NjkyOTA3NTIsImlkZW50aXR5IjoiaXNpYWgiLCJpc3MiOiJBUEkzUDg4RmZnanRlQzMiLCJuYmYiOjE3NjkyODk4NTIsInN1YiI6ImlzaWFoIiwidmlkZW8iOnsiY2FuUHVibGlzaCI6dHJ1ZSwiY2FuUHVibGlzaERhdGEiOnRydWUsImNhblN1YnNjcmliZSI6dHJ1ZSwicm9vbSI6IlJvb20iLCJyb29tSm9pbiI6dHJ1ZX19.psc1kLcY_O0xYDszgZVNnSY-27yD53eKf6N9qPF_Ww0';

interface ConnectionContextType {
isConnectionActive: boolean;
connect: () => void;
disconnect: () => void;
}


const ConnectionContext = createContext<ConnectionContextType>({
isConnectionActive: false,
connect: () => {},
Expand Down
89 changes: 79 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"@config-plugins/react-native-webrtc": "13.0.0",
"@expo/vector-icons": "^15.0.3",
"@livekit/components-react": "^2.9.15",
"@livekit/react-native": "^2.9.5",
"@livekit/react-native": "^2.9.6",
"@livekit/react-native-expo-plugin": "^1.0.1",
"@livekit/react-native-webrtc": "^137.0.0",
"@livekit/react-native-webrtc": "^137.0.2",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"expo": "^54.0.22",
Expand All @@ -34,7 +34,7 @@
"expo-status-bar": "~3.0.8",
"expo-symbols": "~1.0.7",
"expo-system-ui": "~6.0.8",
"livekit-client": "^2.15.16",
"livekit-client": "^2.17.0",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-native": "0.81.5",
Expand Down