File tree 5 files changed +8
-8
lines changed
5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @humeai/voice-embed-react" ,
3
- "version" : " 0.1.21 " ,
3
+ "version" : " 0.1.22 " ,
4
4
"description" : " " ,
5
5
"main" : " ./dist/index.js" ,
6
6
"module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @humeai/voice-embed" ,
3
- "version" : " 0.1.21 " ,
3
+ "version" : " 0.1.22 " ,
4
4
"description" : " " ,
5
5
"main" : " ./dist/index.js" ,
6
6
"module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @humeai/voice-react" ,
3
- "version" : " 0.1.21 " ,
3
+ "version" : " 0.1.22 " ,
4
4
"description" : " " ,
5
5
"main" : " ./dist/index.js" ,
6
6
"module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
25
25
useVoiceClient ,
26
26
VoiceReadyState ,
27
27
} from './useVoiceClient' ;
28
- import { ConnectConfig } from '../models/connect-options' ;
28
+ import { ConnectOptions } from '../models/connect-options' ;
29
29
import {
30
30
AssistantTranscriptMessage ,
31
31
AudioOutputMessage ,
@@ -51,7 +51,7 @@ type VoiceStatus =
51
51
} ;
52
52
53
53
export type VoiceContextType = {
54
- connect : ( ) => Promise < void > ;
54
+ connect : ( options ?: ConnectOptions ) => Promise < void > ;
55
55
disconnect : ( ) => void ;
56
56
fft : number [ ] ;
57
57
isMuted : boolean ;
@@ -320,10 +320,10 @@ export const VoiceProvider: FC<VoiceProviderProps> = ({
320
320
} , [ sendResumeAssistantMessage , updateError ] ) ;
321
321
322
322
const connect = useCallback (
323
- async ( connectConfig : ConnectConfig = { } ) => {
323
+ async ( options : ConnectOptions = { } ) => {
324
324
updateError ( null ) ;
325
325
setStatus ( { value : 'connecting' } ) ;
326
- const permission = await getStream ( connectConfig . audioConstraints ) ;
326
+ const permission = await getStream ( options . audioConstraints ) ;
327
327
328
328
if ( permission === 'denied' ) {
329
329
const message = 'Microphone permission denied' ;
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ export type AudioConstraints = {
4
4
autoGainControl ?: boolean ;
5
5
} ;
6
6
7
- export type ConnectConfig = {
7
+ export type ConnectOptions = {
8
8
audioConstraints ?: AudioConstraints ;
9
9
} ;
You can’t perform that action at this time.
0 commit comments