| .. | .. |
|---|
| 24 | 24 | connect: (config?: ServerConfig) => void; |
|---|
| 25 | 25 | disconnect: () => void; |
|---|
| 26 | 26 | sendTextMessage: (text: string) => boolean; |
|---|
| 27 | | - sendVoiceMessage: (audioBase64: string, transcript?: string) => boolean; |
|---|
| 27 | + sendVoiceMessage: (audioBase64: string, transcript?: string, messageId?: string) => boolean; |
|---|
| 28 | 28 | sendImageMessage: (imageBase64: string, caption: string, mimeType: string) => boolean; |
|---|
| 29 | 29 | sendCommand: (command: string, args?: Record<string, unknown>) => boolean; |
|---|
| 30 | 30 | saveServerConfig: (config: ServerConfig) => Promise<void>; |
|---|
| .. | .. |
|---|
| 120 | 120 | }, []); |
|---|
| 121 | 121 | |
|---|
| 122 | 122 | const sendVoiceMessage = useCallback( |
|---|
| 123 | | - (audioBase64: string, transcript: string = ""): boolean => { |
|---|
| 123 | + (audioBase64: string, transcript: string = "", messageId?: string): boolean => { |
|---|
| 124 | 124 | return wsClient.send({ |
|---|
| 125 | 125 | type: "voice", |
|---|
| 126 | 126 | content: transcript, |
|---|
| 127 | 127 | audioBase64, |
|---|
| 128 | + messageId, |
|---|
| 128 | 129 | }); |
|---|
| 129 | 130 | }, |
|---|
| 130 | 131 | [] |
|---|