mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-20 15:20:39 -07:00
Implement sample audio retrieval and update playback functionality
- Added a new API endpoint to serve profile sample audio files. - Introduced a method in the apiClient to generate sample audio URLs. - Refactored the SampleList component to utilize the new API for audio playback, enhancing the user experience. - Cleaned up unused imports and optimized the handlePlay function for better performance.
This commit is contained in:
@@ -146,6 +146,10 @@ class ApiClient {
|
||||
return `${this.getBaseUrl()}/audio/${audioId}`;
|
||||
}
|
||||
|
||||
getSampleUrl(sampleId: string): string {
|
||||
return `${this.getBaseUrl()}/samples/${sampleId}`;
|
||||
}
|
||||
|
||||
// Transcription
|
||||
async transcribeAudio(file: File, language?: 'en' | 'zh'): Promise<TranscriptionResponse> {
|
||||
const formData = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user