mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Add provider-backed dictation mode (#1327)
This commit is contained in:
@@ -12,9 +12,11 @@ import {
|
||||
writeStoredVoiceSelection,
|
||||
} from '@/lib/voicePickerPreferences'
|
||||
import type { VoiceBackendType } from '@hapi/protocol/voice'
|
||||
import { useVoiceInputPreferences } from '@/hooks/useVoiceInputPreferences'
|
||||
|
||||
export function useVoiceSettings() {
|
||||
const { api } = useAppContext()
|
||||
const input = useVoiceInputPreferences(api)
|
||||
const { locale } = useTranslation()
|
||||
const [configuredBackends, setConfiguredBackends] = useState<VoiceBackendType[]>([])
|
||||
const [backend, setBackendState] = useState<VoiceBackendType | null>(null)
|
||||
@@ -106,6 +108,7 @@ export function useVoiceSettings() {
|
||||
useEffect(() => stopPreview, [stopPreview])
|
||||
|
||||
return {
|
||||
...input,
|
||||
configuredBackends,
|
||||
backend,
|
||||
setBackend,
|
||||
|
||||
Reference in New Issue
Block a user