Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
microphoneEntryKey,
microphoneOrder,
} from "../../lib/microphonePriority";
import { getLocalVoiceTranscriber } from "../../native/voiceTranscription";
import { mobilePreferencesAtom, updateMobilePreferencesAtom } from "../../state/preferences";
import { ListRowLayout } from "../../components/ui/ListRowLayout";
import { ThreadSwipeable } from "../home/thread-swipe-actions";
Expand Down Expand Up @@ -89,6 +90,35 @@ const KINDS: Record<
};

export function SettingsMicrophoneRouteScreen() {
return getLocalVoiceTranscriber() === null ? <VoiceInputUnavailable /> : <MicrophoneSettings />;
}

function VoiceInputUnavailable() {
const insets = useSafeAreaInsets();
return (
<View collapsable={false} className="flex-1 bg-sheet">
<ScrollView
contentInsetAdjustmentBehavior="automatic"
showsVerticalScrollIndicator={false}
className="flex-1"
contentContainerClassName="gap-3 px-5 pt-4"
contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }}
>
<SettingsSection title="Voice input">
<ListRowLayout icon="mic" label="Not available on this device" />
</SettingsSection>
<Text className="px-2 text-sm text-foreground-muted">
T3 Code's voice input uses Apple's on-device speech transcription, which needs iOS 26 or
later on a device that supports it. Without it, the composer has no microphone button, and
allowing microphone access won't add one. Apple keyboard dictation is separate and isn't
affected.
</Text>
</ScrollView>
</View>
);
}

function MicrophoneSettings() {
const insets = useSafeAreaInsets();
const preferencesResult = useAtomValue(mobilePreferencesAtom);
const savePreferences = useAtomSet(updateMobilePreferencesAtom);
Expand Down
4 changes: 4 additions & 0 deletions docs/user/composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ On supported iPhones with iOS 26 or later, use the composer's microphone to reco
then confirm to transcribe. Text is inserted where your selection was when
recording started, ready for you to review and edit before sending.

Voice input depends on Apple's on-device speech transcription. On a device without
it, the composer has no microphone button and **Settings → Microphone** says voice
input isn't available.

The first use may download Apple's speech model and needs a network connection.
Later transcription works offline for that language. Recordings can be up to five
minutes long. Canceling, leaving the screen, or an audio interruption discards the
Expand Down
Loading