feat(mobile-app): prepare native app packaging
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { AsrResponse, SpeechPlaybackStatus, SpeechSelectedFile, SpeechVoiceProfile, TtsResponse } from '@/types/api';
|
||||
import { apiRequest, apiUrl, authHeaders, readTextPayload } from './api';
|
||||
import type { SpeechCapture } from './speech-capture';
|
||||
|
||||
const audioExtensions = ['.mp3', '.wav', '.m4a', '.webm', '.aac', '.ogg'];
|
||||
|
||||
@@ -91,6 +92,14 @@ export const transcribeSpeechBlob = (
|
||||
xhr.send(form);
|
||||
});
|
||||
|
||||
export const transcribeSpeechCapture = (
|
||||
capture: SpeechCapture,
|
||||
filename: string,
|
||||
registerAbort?: SpeechAbortRegistrar
|
||||
) => capture.kind === 'blob'
|
||||
? transcribeSpeechBlob(capture.blob, filename, registerAbort)
|
||||
: transcribeSpeechFile(capture.file, registerAbort);
|
||||
|
||||
export const synthesizeSpeech = (text: string, voiceProfile?: SpeechVoiceProfile) =>
|
||||
apiRequest<TtsResponse>({
|
||||
url: '/api/ai/tts',
|
||||
|
||||
Reference in New Issue
Block a user