1+ package ai .z .openapi .api .voiceclone ;
2+
3+ import ai .z .openapi .service .voiceclone .VoiceCloneRequest ;
4+ import ai .z .openapi .service .voiceclone .VoiceCloneResult ;
5+ import ai .z .openapi .service .voiceclone .VoiceDeleteRequest ;
6+ import ai .z .openapi .service .voiceclone .VoiceDeleteResult ;
7+ import ai .z .openapi .service .voiceclone .VoiceListResult ;
8+ import io .reactivex .rxjava3 .core .Single ;
9+ import retrofit2 .http .Body ;
10+ import retrofit2 .http .GET ;
11+ import retrofit2 .http .Header ;
12+ import retrofit2 .http .POST ;
13+ import retrofit2 .http .Query ;
14+
15+ /**
16+ * Voice Clone API for voice cloning and management operations. Provides endpoints for
17+ * creating voice clones from audio samples, deleting existing voice clones, and listing
18+ * available voice clones.
19+ */
20+ public interface VoiceCloneApi {
21+
22+ /**
23+ * Creates a new voice clone from provided audio sample and parameters. Uses advanced
24+ * neural voice cloning technology to generate a custom voice model that can
25+ * synthesize speech matching the characteristics of the provided sample.
26+ * @param request voice clone creation parameters including voice name, sample text,
27+ * target text, and audio file reference
28+ * @return voice clone creation result with voice ID and preview file information
29+ */
30+ @ POST ("voice/clone" )
31+ Single <VoiceCloneResult > cloneVoice (@ Body VoiceCloneRequest request );
32+
33+ /**
34+ * Deletes an existing voice clone by voice ID. Permanently removes the voice model
35+ * and associated data from the system. This operation cannot be undone.
36+ * @param request voice deletion parameters containing the voice ID to delete
37+ * @return voice deletion result with confirmation and deletion timestamp
38+ */
39+ @ POST ("voice/delete" )
40+ Single <VoiceDeleteResult > deleteVoice (@ Body VoiceDeleteRequest request );
41+
42+ /**
43+ * Retrieves a list of available voice clones with optional filtering. Returns
44+ * metadata and details for voice clones including voice IDs, names, types, download
45+ * URLs, and creation timestamps.
46+ * @param voiceType optional voice type filter
47+ * @param voiceName optional voice name filter
48+ * @return list of voice clone data with comprehensive metadata
49+ */
50+ @ GET ("voice/list" )
51+ Single <VoiceListResult > listVoices (@ Query ("voiceType" ) String voiceType , @ Query ("voiceName" ) String voiceName );
52+
53+ /**
54+ * Retrieves a list of available voice clones with optional filtering and Request-Id
55+ * header. Returns metadata and details for voice clones including voice IDs, names,
56+ * types, download URLs, and creation timestamps.
57+ * @param voiceType optional voice type filter
58+ * @param voiceName optional voice name filter
59+ * @param requestId unique request identifier for tracking and monitoring
60+ * @return list of voice clone data with comprehensive metadata
61+ */
62+ @ GET ("voice/list" )
63+ Single <VoiceListResult > listVoices (@ Query ("voiceType" ) String voiceType , @ Query ("voiceName" ) String voiceName ,
64+ @ Header ("Request-Id" ) String requestId );
65+
66+ }
0 commit comments