Public Member Functions | |
void | GetUrl (V2TIMValueCallback< V2TIMString > *callback) |
void | DownloadSound (const V2TIMString &path, V2TIMDownloadCallback *callback) |
void | ConvertVoiceToText (const V2TIMString &language, V2TIMValueCallback< V2TIMString > *callback) |
V2TIMSoundElem () | |
V2TIMSoundElem (const V2TIMSoundElem &) | |
V2TIMSoundElem & | operator= (const V2TIMSoundElem &) |
~V2TIMSoundElem () override | |
Data Fields | |
V2TIMString | path |
V2TIMString | uuid |
uint64_t | dataSize |
uint32_t | duration |
V2TIMElemType | elemType |
void * | obj_ptr |
V2TIMSoundElem | ( | ) |
V2TIMSoundElem | ( | const V2TIMSoundElem & | ) |
|
override |
void GetUrl | ( | V2TIMValueCallback< V2TIMString > * | callback | ) |
Get the voice download URL.
void DownloadSound | ( | const V2TIMString & | path, |
V2TIMDownloadCallback * | callback | ||
) |
Download voice
The downloadSound API downloads files from the server each time. If cache or storage is required, you can use UUIDs as keys for external storage. The IM SDK does not store resource files.
path | Voice save path, which must be specified externally |
void ConvertVoiceToText | ( | const V2TIMString & | language, |
V2TIMValueCallback< V2TIMString > * | callback | ||
) |
Convert the voice to text (supported only in 7.4 and later versions).
language | Recognition language of voice. |
V2TIMSoundElem& operator= | ( | const V2TIMSoundElem & | ) |
V2TIMString path |
Voice file path(valid only for the message sender)
V2TIMString uuid |
Internal ID of the voice message.
uint64_t dataSize |
Voice file size.
uint32_t duration |
Voice duration (seconds)
|
inherited |
element type
|
inherited |