当前 SDK 所支持的离线合成存在几个有明显区别的方案:v2, v4, v5. 其中 v2 已经不再迭代也不再推荐使用;v4 是当前最稳定的版本;v5 是效果最好的版本。
并不是每个 SDK 组件都支持 v2, v4 和 v5, 为了能体现出 SDK 与其所支持的离线合成方案之间的关系,在 2023 年 8 月我们修改了 SDK 的版本号规则,后续发布的 SDK 就能根据组件版本号来区分其所支持的离线合成方案。
SDK 组件版本号规则为 max.min.x, 其中max表示所支持的最高版本的离线合成方案,min表示所支持的最低版本的离线合成方案,x 和离线合成方案没有关系,只是一个从 0 开始递增的数字。例如
所支持的离线合成方案 | 组件版本号 |
|---|---|
支持 v4 和 v5 | 5.4.0, 5.4.1, 5.4.1.1-bugfix 等等 |
仅支持 v4 | 4.4.0, 4.4.1, 4.4.1.1-bugfix 等等 |
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '5.4.6' | com.bytedance.speechengine:speechengine_tts_tob:5.4.8 |
ENABLE_WS_RECONNECT_BOOL用于控制当 websocket 建连失败后是否自动重连,默认为true;TTS_FRONTEND_INFO, 要接收该类型的消息回调,需将TTS_WITH_FRONTEND_INT配置为 1;无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '5.4.5' | com.bytedance.speechengine:speechengine_tts_tob:5.4.7 |
无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '5.4.3.7-bugfix' | com.bytedance.speechengine:speechengine_tts_tob:5.4.6.3-bugfix |
无。
注意
从这个版本开始,Android 和 iOS 两端都移除了对并发合成策略的支持。
iOS | Android |
|---|---|
无更新 | com.bytedance.speechengine:speechengine_tts_tob:5.4.6 |
/** * Player instance disable reuse before start. * Optional, default is: false, configure it before init engine. */ public static final String PARAMS_KEY_PLAYER_DISABLE_REUSE_BOOL = "player_disable_reuse";
无。
iOS | Android |
|---|---|
无更新 | com.bytedance.speechengine:speechengine_tts_tob:5.4.5 |
无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '5.4.3.2-bugfix' | com.bytedance.speechengine:speechengine_tts_tob:5.4.3 |
/** * Parameter used by TTS online. * Default is 0, use 1 when you want enable the optimization of phoneme recognition in English.. * Optional for TTS, config it before start. */ public static final String PARAMS_KEY_TTS_PURE_ENGLISH_OPT_INT = "tts_pure_english_opt";
/// @const Parameter used by TTS online. /// @abstract Default is 0, use 1 when you want enable the optimization of phoneme recognition in English.. /// @discussion Optional for TTS, config it before start. extern const NSString* SE_PARAMS_KEY_TTS_PURE_ENGLISH_OPT_INT;
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '5.4.2.1-bugfix' | com.bytedance.speechengine:speechengine_tts_tob:5.4.2 |
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '5.4.1' | com.bytedance.speechengine:speechengine_tts_tob:5.4.1 |
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '4.4.0' | com.bytedance.speechengine:speechengine_tts_tob:4.4.0 |
注意
在 Android 端,需要开发者调用setContext接口配置 Android Application Context 后 SDK 才可自动将埋点数据存放到 APP 私有目录。
iOS | Android |
|---|---|
无更新 | com.bytedance.speechengine:speechengine_tts_tob:5.4.0 |
/** * The language of synthesised audio used in online. * Optional for TTS, configure it before start engine. */ public static final String PARAMS_KEY_TTS_LANGUAGE_ONLINE_STRING = "tts_language_online";
emotion字段,无需配合voice字段即可指定合成所用的情感,各音色支持的情感详见音色列表;/** * Emotion used by tts online, substitute tts_style. * Optional for TTS, default is empty, configure it before start engine. */ public static final String PARAMS_KEY_TTS_EMOTION_STRING = "tts_emotion";
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.38' | com.bytedance.speechengine:speechengine_tts_tob:1.0.62 |
注意
该版本Android端需要增加额外的混淆规则,否则release版本可能会出现问题:
-keep class com.ttnet.org.chromium.net.impl.NativeCronetProvider {*;}
iOS | Android |
|---|---|
无更新 | com.bytedance.speechengine:speechengine_tts_tob:1.0.59.2-bugfix |
无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.37' | com.bytedance.speechengine:speechengine_tts_tob:1.0.59 |
iOS | Android |
|---|---|
无更新 | com.bytedance.speechengine:speechengine_tts_tob:1.0.58 |
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.36.1-bugfix' | com.bytedance.speechengine:speechengine_tts_tob:1.0.57.1-bugfix |
无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.36' | com.bytedance.speechengine:speechengine_tts_tob:1.0.57 |
无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.35.2-bugfix' | 无更新 |
无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.35' | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.57-alpha.0' |
BV040_streaming音色体验;BV503_streaming音色合成文本abc123发生的崩溃问题BV503_streaming和BV040_streaming音色在文本QAQ的发音;iOS | Android |
|---|---|
无更新 | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.56.5-bugfix' |
无。
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.34.1-bugfix' | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.56.2-bugfix' |
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.31' | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.54' |
/** * Tts with intent * This paramter means if enable intent prediction from server. * Optional for online TTS, default is false, config it before start engine. */ public static final String PARAMS_KEY_TTS_WITH_INTENT_BOOL = "tts_with_intent";
/// @const SE_PARAMS_KEY_TTS_WITH_INTENT_BOOL. /// @abstract Parameter means if enable intent prediction from server. /// @discussion Optional for online TTS, default is false, config it before start engine. extern const NSString* SE_PARAMS_KEY_TTS_WITH_INTENT_BOOL;
iOS | Android |
|---|---|
'SpeechEngineTtsToB', '1.0.30' | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.52' |
注意
从这个版本开始,iOS 端组件换了新组件名, 如果您正在使用旧组件请参考集成指南完成迁移。
无
iOS | Android |
|---|---|
无更新 | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.51' |
iOS | Android |
|---|---|
无更新 | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.50.1-bugfix' |
无
iOS | Android |
|---|---|
无更新 | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.50' |
/** * Tts enable player. * Enable player, palying the synthesis audio. * Required for TTS, default is true, config it before start. */ public static final String PARAMS_KEY_TTS_ENABLE_PLAYER_BOOL = "tts_enable_player";
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.29' | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.48.2-bugfix' |
无
iOS | Android |
|---|---|
无更新 | 'com.bytedance.speechengine:speechengine_tts_tob:1.0.48.1-bugfix' |
注意
从这个版本开始,Android 端组件换了新的 maven 仓库和 Artifact ID, 如果您正在使用旧组件请参考集成指南完成迁移。
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.28' | 'com.bytedance.speechengine:speechengine_tts:1.0.47' |
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.26' | 'com.bytedance.speechengine:speechengine_tts:1.0.44' |
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.25' | 'com.bytedance.speechengine:speechengine_tts:1.0.43' |
无
iOS | Android |
|---|---|
无更新 | 'com.bytedance.speechengine:speechengine_tts:1.0.42' |
无
/** * Authenticate credential * Key used in late_bind authentication. After setting, it will be used as the unique ID of the device during the authentication process. * Optional in ToB project when authenticate_type equals late_bind, configure it before init engine. */ public static final String PARAMS_KEY_AUTHENTICATE_CREDENTIAL = "authenticate_credential";
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.24' | 'com.bytedance.speechengine:speechengine_tts:1.0.41' |
/** * Tts style name. * Style name, example: neutral, happy, sad. * Optional or TTS, default is empty, configure it before starting engine. */ public static final String PARAMS_KEY_TTS_STYLE_NAME_STRING = "tts_style_name";
/// @const SE_PARAMS_KEY_TTS_STYLE_NAME_STRING. /// @abstract TTts style name, example: neutral, happy, sad. /// @discussion Required for TTS, default is empty, configure it before starting engine. extern const NSString* SE_PARAMS_KEY_TTS_STYLE_NAME_STRING;
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.23' | 'com.bytedance.speechengine:speechengine_tts:1.0.39' |
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.22' | 'com.bytedance.speechengine:speechengine_tts:1.0.38' |
/** * User Id. * Unique Id for user. * Optional, use this to trace a special user's log. */ public static final String PARAMS_KEY_UID_STRING = "uid"; /** * Device id. * Used as a unique id to distinguish the device when uploading the user action info. * Optional, default is empty, configure it before init engine. */ public static final String PARAMS_KEY_DEVICE_ID_STRING = "device_id";
/// @const SE_PARAMS_KEY_UID_STRING. /// @abstract Unique Id for user. /// @discussion Optional, use this to trace a special user's log. extern const NSString* SE_PARAMS_KEY_UID_STRING; /// @const SE_PARAMS_KEY_DEVICE_ID_STRING. /// @abstract Device id, Used as a unique id to distinguish the device when uploading the user action info. /// @discussion Optional, default is empty, configure it before init engine. extern const NSString* SE_PARAMS_KEY_DEVICE_ID_STRING;
/** * Audio stream type. * Tell the player which audio stream type to use, currently only works on the android platform. * Optional, default is: AUDIO_STREAM_TYPE_MEDIA, configure it before init engine. */ public static final String PARAMS_KEY_AUDIO_STREAM_TYPE_INT = "audio_stream_type";
iOS | Android |
|---|---|
'SpeechEngineTts', '1.0.21' | 'com.bytedance.speechengine:speechengine_tts:1.0.37' |
无