@@ -18,6 +18,7 @@ import {
1818 microphoneEntryKey ,
1919 microphoneOrder ,
2020} from "../../lib/microphonePriority" ;
21+ import { getLocalVoiceTranscriber } from "../../native/voiceTranscription" ;
2122import { mobilePreferencesAtom , updateMobilePreferencesAtom } from "../../state/preferences" ;
2223import { ListRowLayout } from "../../components/ui/ListRowLayout" ;
2324import { ThreadSwipeable } from "../home/thread-swipe-actions" ;
@@ -89,6 +90,35 @@ const KINDS: Record<
8990} ;
9091
9192export function SettingsMicrophoneRouteScreen ( ) {
93+ return getLocalVoiceTranscriber ( ) === null ? < VoiceInputUnavailable /> : < MicrophoneSettings /> ;
94+ }
95+
96+ function VoiceInputUnavailable ( ) {
97+ const insets = useSafeAreaInsets ( ) ;
98+ return (
99+ < View collapsable = { false } className = "flex-1 bg-sheet" >
100+ < ScrollView
101+ contentInsetAdjustmentBehavior = "automatic"
102+ showsVerticalScrollIndicator = { false }
103+ className = "flex-1"
104+ contentContainerClassName = "gap-3 px-5 pt-4"
105+ contentContainerStyle = { { paddingBottom : Math . max ( insets . bottom , 18 ) + 18 } }
106+ >
107+ < SettingsSection title = "Voice input" >
108+ < ListRowLayout icon = "mic" label = "Not available on this device" />
109+ </ SettingsSection >
110+ < Text className = "px-2 text-sm text-foreground-muted" >
111+ T3 Code's voice input uses Apple's on-device speech transcription, which needs iOS 26 or
112+ later on a device that supports it. Without it, the composer has no microphone button, and
113+ allowing microphone access won't add one. Apple keyboard dictation is separate and isn't
114+ affected.
115+ </ Text >
116+ </ ScrollView >
117+ </ View >
118+ ) ;
119+ }
120+
121+ function MicrophoneSettings ( ) {
92122 const insets = useSafeAreaInsets ( ) ;
93123 const preferencesResult = useAtomValue ( mobilePreferencesAtom ) ;
94124 const savePreferences = useAtomSet ( updateMobilePreferencesAtom ) ;
0 commit comments