mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
first pass of stereo support
This commit is contained in:
@@ -1870,7 +1870,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_open(_In_ switch_speech_handl
|
||||
const char *module_name,
|
||||
const char *voice_name,
|
||||
_In_ unsigned int rate,
|
||||
_In_ unsigned int interval, switch_speech_flag_t *flags, _In_opt_ switch_memory_pool_t *pool);
|
||||
_In_ unsigned int interval,
|
||||
_In_ unsigned int channels,
|
||||
switch_speech_flag_t *flags, _In_opt_ switch_memory_pool_t *pool);
|
||||
/*!
|
||||
\brief Feed text to the TTS module
|
||||
\param sh the speech handle to feed
|
||||
|
||||
@@ -311,6 +311,7 @@ struct switch_file_handle {
|
||||
uint32_t native_rate;
|
||||
/*! the number of channels */
|
||||
uint32_t channels;
|
||||
uint32_t real_channels;
|
||||
/*! integer representation of the format */
|
||||
unsigned int format;
|
||||
/*! integer representation of the sections */
|
||||
@@ -435,7 +436,7 @@ struct switch_speech_interface {
|
||||
/*! the name of the interface */
|
||||
const char *interface_name;
|
||||
/*! function to open the speech interface */
|
||||
switch_status_t (*speech_open) (switch_speech_handle_t *sh, const char *voice_name, int rate, switch_speech_flag_t *flags);
|
||||
switch_status_t (*speech_open) (switch_speech_handle_t *sh, const char *voice_name, int rate, int channels, switch_speech_flag_t *flags);
|
||||
/*! function to close the speech interface */
|
||||
switch_status_t (*speech_close) (switch_speech_handle_t *, switch_speech_flag_t *flags);
|
||||
/*! function to feed audio to the ASR */
|
||||
@@ -466,6 +467,8 @@ struct switch_speech_handle {
|
||||
uint32_t rate;
|
||||
uint32_t speed;
|
||||
uint32_t samples;
|
||||
uint32_t channels;
|
||||
uint32_t real_channels;
|
||||
char voice[80];
|
||||
char *engine;
|
||||
/*! module specific param */
|
||||
@@ -599,6 +602,8 @@ struct switch_codec_fmtp {
|
||||
int bits_per_second;
|
||||
/*! number of microseconds of media in one packet (ptime * 1000) */
|
||||
int microseconds_per_packet;
|
||||
/*! stereo */
|
||||
int stereo;
|
||||
/*! private data for the codec module to store handle specific info */
|
||||
void *private_info;
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ SWITCH_BEGIN_EXTERN_C
|
||||
uint32_t to_len;
|
||||
/*! the total size of the to buffer */
|
||||
uint32_t to_size;
|
||||
/*! the number of channels */
|
||||
int channels;
|
||||
|
||||
} switch_audio_resampler_t;
|
||||
|
||||
@@ -171,7 +173,7 @@ SWITCH_DECLARE(void) switch_change_sln_volume_granular(int16_t *data, uint32_t s
|
||||
|
||||
SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples);
|
||||
SWITCH_DECLARE(uint32_t) switch_unmerge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples);
|
||||
SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t channels);
|
||||
SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t orig_channels, uint32_t channels);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user