1 /* 2 * Copyright (C) 2015-2020 Alibaba Group Holding Limited 3 */ 4 5 #ifndef __UVOICE_AIYUNTTS_H__ 6 #define __UVOICE_AIYUNTTS_H__ 7 8 typedef struct { 9 char app_key[20]; /* get it form the cloud service */ 10 char token[36]; /* get it form the cloud service */ 11 media_format_t format; /* tts output format, now only support wav, pcm, mp3 */ 12 int sample_rate; /* support 8000Hz��16000Hz */ 13 char voice[8]; /* voice people */ 14 int volume; /* 0 ~ 100 */ 15 int speech_rate; /* -500 ~ 500 */ 16 int pitch_rate; /* -500 ~ 500 */ 17 tts_encode_type_e text_encode_type; 18 } aliyun_tts_config_t; 19 20 21 int uvoice_tts_aliyun_init(tts_config_t *config); 22 int uvoice_tts_aliyun_request(char *text, tts_recv_type_e recv_type, tts_recv_callback_t *recv_cb); 23 int uvoice_tts_aliyun_stop(); 24 25 #endif /* __UVOICE_AIYUNTTS_H__ */