feat: implement TTS event handling for creation, completion, and failure in TTSPage and SocketContext
This commit is contained in:
@@ -11,6 +11,8 @@ export interface TTSResponse {
|
||||
text: string
|
||||
provider: string
|
||||
options: Record<string, any>
|
||||
status: string
|
||||
error: string | null
|
||||
sound_id: number | null
|
||||
user_id: number
|
||||
created_at: string
|
||||
|
||||
@@ -37,6 +37,7 @@ export const playerEvents = new EventEmitter()
|
||||
export const soundEvents = new EventEmitter()
|
||||
export const userEvents = new EventEmitter()
|
||||
export const extractionEvents = new EventEmitter()
|
||||
export const ttsEvents = new EventEmitter()
|
||||
|
||||
// Auth event types
|
||||
export const AUTH_EVENTS = {
|
||||
@@ -69,3 +70,11 @@ export const EXTRACTION_EVENTS = {
|
||||
EXTRACTION_COMPLETED: 'extraction_completed',
|
||||
EXTRACTION_FAILED: 'extraction_failed',
|
||||
} as const
|
||||
|
||||
// TTS event types
|
||||
export const TTS_EVENTS = {
|
||||
TTS_STATUS_UPDATED: 'tts_status_updated',
|
||||
TTS_CREATED: 'tts_created',
|
||||
TTS_COMPLETED: 'tts_completed',
|
||||
TTS_FAILED: 'tts_failed',
|
||||
} as const
|
||||
|
||||
Reference in New Issue
Block a user