File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
app/components/realtime-chat Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import {
23
23
RTInputAudioItem ,
24
24
RTResponse ,
25
25
TurnDetection ,
26
+ Voice ,
26
27
} from "rt-client" ;
27
28
import { AudioHandler } from "@/app/lib/audio" ;
28
29
import { uploadImage } from "@/app/utils/chat" ;
@@ -54,6 +55,7 @@ export function RealtimeChat({
54
55
const [ endpoint , setEndpoint ] = useState ( "" ) ;
55
56
const [ deployment , setDeployment ] = useState ( "" ) ;
56
57
const [ useVAD , setUseVAD ] = useState ( true ) ;
58
+ const [ voice , setVoice ] = useState < Voice > ( "alloy" ) ;
57
59
58
60
const clientRef = useRef < RTClient | null > ( null ) ;
59
61
const audioHandlerRef = useRef < AudioHandler | null > ( null ) ;
@@ -78,6 +80,7 @@ export function RealtimeChat({
78
80
: null ;
79
81
clientRef . current . configure ( {
80
82
instructions : "" ,
83
+ voice,
81
84
input_audio_transcription : { model : "whisper-1" } ,
82
85
turn_detection : turnDetection ,
83
86
tools : [ ] ,
You can’t perform that action at this time.
0 commit comments