mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-19 06:40:38 -07:00
- Introduced functionality to save and restore form state as a draft when creating a new voice profile. - Added helper functions for converting files to and from base64 format to facilitate file handling. - Updated the API types to use a more flexible LanguageCode type for language parameters. - Enhanced the UI store to manage profile form drafts, improving user experience during profile creation.
11 lines
361 B
TypeScript
11 lines
361 B
TypeScript
import { useMutation } from '@tanstack/react-query';
|
|
import { apiClient } from '@/lib/api/client';
|
|
import type { LanguageCode } from '@/lib/constants/languages';
|
|
|
|
export function useTranscription() {
|
|
return useMutation({
|
|
mutationFn: ({ file, language }: { file: File; language?: LanguageCode }) =>
|
|
apiClient.transcribeAudio(file, language),
|
|
});
|
|
}
|