ZMVideoSDKLiveTranscriptionHelper.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. #import <Foundation/Foundation.h>
  2. #import "ZMVideoSDKUserHelper.h"
  3. NS_ASSUME_NONNULL_BEGIN
  4. @interface ZMVideoSDKLiveTranscriptionLanguage : NSObject
  5. /**
  6. @brief The id of the language.
  7. */
  8. @property (nonatomic, assign, readonly)int languageID;
  9. /**
  10. @brief The name of the language.
  11. */
  12. @property (nonatomic, copy, readonly)NSString *languageName;
  13. @end
  14. /**
  15. @brief Live transcription message interface.
  16. */
  17. @interface ZMVideoSDKLiveTranscriptionMessageInfo : NSObject
  18. /**
  19. @brief Get the message ID of the current message.
  20. */
  21. @property (nonatomic, copy, readonly) NSString *messageID;
  22. /**
  23. @brief Get the speaker's ID.
  24. */
  25. @property (nonatomic, copy, readonly) NSString *speakerID;
  26. /**
  27. @brief Get the speaker's name.
  28. */
  29. @property (nonatomic, copy, readonly) NSString *speakerName;
  30. /**
  31. @brief Get the content of the current message.
  32. */
  33. @property (nonatomic, copy, readonly) NSString *messageContent;
  34. /**
  35. @brief Get the time stamp of the current message.
  36. */
  37. @property (nonatomic, assign, readonly) time_t timeStamp;
  38. /**
  39. @brief Get the type of the current message.
  40. */
  41. @property (nonatomic, assign, readonly) ZMVideoSDKLiveTranscriptionOperationType messageType;
  42. @end
  43. @interface ZMVideoSDKLiveTranscriptionHelper : NSObject
  44. /**
  45. @brief Query if the user can start live transcription.
  46. */
  47. -(BOOL)canStartLiveTranscription;
  48. /**
  49. @brief Get the current live transcription status.
  50. @return If the function succeeds, the return value is the current live transcription status. For more details refer to {@link ZMVideoSDKLiveTranscriptionStatus}.
  51. */
  52. -(ZMVideoSDKLiveTranscriptionStatus)getLiveTranscriptionStatus;
  53. /**
  54. @brief Start live transcription.
  55. @Note If the session allows multi-language transcription, all user can start live transcription. Otherwise only the host can start it.
  56. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  57. */
  58. -(ZMVideoSDKErrors)startLiveTranscription;
  59. /**
  60. @brief Stop live transcription.
  61. @Note If the session allows multi-language transcription, all user can stop live transcription. Otherwise only the host can stop it.
  62. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  63. */
  64. -(ZMVideoSDKErrors)stopLiveTranscription;
  65. /**
  66. @brief Get the list of all available spoken languages in session.
  67. @return If the function succeeds, the return value is the list of the available spoken languages in a session.
  68. */
  69. -(NSArray<ZMVideoSDKLiveTranscriptionLanguage*> *)getAvailableSpokenLanguages;
  70. /**
  71. @brief Set the spoken language of the current user.
  72. @param languageID The spoken language ID.
  73. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  74. */
  75. -(ZMVideoSDKErrors)setSpokenLanguage:(int)languageID;
  76. /**
  77. @brief Get the spoken language of the current user.
  78. */
  79. -(ZMVideoSDKLiveTranscriptionLanguage*)getSpokenLanguage;
  80. /**
  81. @brief Get the list of all available translation languages in a session.
  82. @return If the function succeeds, the return value is the list of all available translation languages in a session.
  83. */
  84. -(NSArray<ZMVideoSDKLiveTranscriptionLanguage*> *)getAvailableTranslationLanguages;
  85. /**
  86. @brief Set the translation language of the current user.
  87. @param languageID The translation language ID. If the language id is set to -1, live translation will be disabled.
  88. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  89. */
  90. -(ZMVideoSDKErrors)setTranslationLanguage:(int)languageID;
  91. /**
  92. @brief Get the translation language of the current user.
  93. */
  94. -(ZMVideoSDKLiveTranscriptionLanguage*)getTranslationLanguage;
  95. /**
  96. @brief Enable or disable to receive original and translated content. If you enable this feature, you must start live transcription.
  97. @return If the function succeeds, the return value is ZMVideoSDKErrors_Success. Otherwise not.
  98. */
  99. - (ZMVideoSDKErrors)enableReceiveSpokenLanguageContent:(BOOL)enable;
  100. /**
  101. @brief Determine whether the feature to receive original and translated is available.
  102. @return YES indicates that the feature to receive original and translated is available. Otherwise NO.
  103. */
  104. - (BOOL)isReceiveSpokenLanguageContentEnabled;
  105. /**
  106. @brief Determine whether the view history translation message is available.
  107. @return YES indicates that the view history transcription message is available. Otherwise NO.
  108. */
  109. - (BOOL)isAllowViewHistoryTranslationMessageEnabled;
  110. /**
  111. @brief Get the list of all history translation messages in a session.
  112. @return If the function succeeds, the return value is a array of all history translation messages in a session. Otherwise it fails, and the return value is nil.
  113. */
  114. - (NSArray<ZMVideoSDKLiveTranscriptionMessageInfo*>*)getHistoryTranslationMessageList;
  115. @end
  116. NS_ASSUME_NONNULL_END