Merge pull request #29 from getpaseo/voice/background-downloading
Decouple onboarding from voice model downloads and gate unavailable voice starts
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
Text,
|
||||
ActivityIndicator,
|
||||
Platform,
|
||||
Alert,
|
||||
} from "react-native";
|
||||
import { useState, useEffect, useRef, useCallback, useMemo } from "react";
|
||||
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
||||
@@ -469,6 +470,8 @@ export function AgentInputArea({
|
||||
}
|
||||
void voice.startVoice(serverId, agentId).catch((error) => {
|
||||
console.error("[AgentInputArea] Failed to start voice mode", error);
|
||||
const message = error instanceof Error ? error.message : "Voice features are not available right now.";
|
||||
Alert.alert("Voice unavailable", message);
|
||||
});
|
||||
}, [agentId, isConnected, serverId, voice]);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
Image,
|
||||
Platform,
|
||||
BackHandler,
|
||||
Alert,
|
||||
} from "react-native";
|
||||
import {
|
||||
useState,
|
||||
@@ -297,6 +298,8 @@ export const MessageInput = forwardRef<MessageInputRef, MessageInputProps>(
|
||||
}
|
||||
void voice.startVoice(voiceServerId, voiceAgentId).catch((error) => {
|
||||
console.error("[MessageInput] Failed to start realtime voice", error);
|
||||
const message = error instanceof Error ? error.message : "Voice features are not available right now.";
|
||||
Alert.alert("Voice unavailable", message);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -461,6 +464,8 @@ export const MessageInput = forwardRef<MessageInputRef, MessageInputProps>(
|
||||
}
|
||||
void voice.startVoice(voiceServerId, voiceAgentId).catch((error) => {
|
||||
console.error("[MessageInput] Failed to start realtime voice", error);
|
||||
const message = error instanceof Error ? error.message : "Voice features are not available right now.";
|
||||
Alert.alert("Voice unavailable", message);
|
||||
});
|
||||
}, [
|
||||
disabled,
|
||||
|
||||
Reference in New Issue
Block a user