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:
Jamie Pine
2026-01-25 18:44:25 -08:00
parent 6acad47335
commit c62f615162
5 changed files with 29 additions and 8 deletions
+4
View File
@@ -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();