Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build/modules.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ applications/mod_voicemail
#asr_tts/mod_flite
#asr_tts/mod_pocketsphinx
#asr_tts/mod_tts_commandline
#asr_tts/mod_google_tts
#asr_tts/mod_openai_tts
#asr_tts/mod_piper_tts
codecs/mod_amr
#codecs/mod_amrwb
codecs/mod_b64
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,12 @@ AC_CONFIG_FILES([Makefile
src/mod/asr_tts/mod_flite/Makefile
src/mod/asr_tts/mod_pocketsphinx/Makefile
src/mod/asr_tts/mod_tts_commandline/Makefile
src/mod/asr_tts/mod_google_tts/Makefile
src/mod/asr_tts/mod_openai_tts/Makefile
src/mod/asr_tts/mod_piper_tts/Makefile
src/mod/asr_tts/mod_google_tts/Makefile
src/mod/asr_tts/mod_openai_tts/Makefile
src/mod/asr_tts/mod_piper_tts/Makefile
src/mod/codecs/mod_amr/Makefile
src/mod/codecs/mod_amrwb/Makefile
src/mod/codecs/mod_b64/Makefile
Expand Down
11 changes: 11 additions & 0 deletions src/mod/asr_tts/mod_google_tts/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_google_tts

mod_LTLIBRARIES = mod_google_tts.la
mod_google_tts_la_SOURCES = mod_google_tts.c utils.c
mod_google_tts_la_CFLAGS = $(AM_CFLAGS) -I.
mod_google_tts_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_google_tts_la_LDFLAGS = -avoid-version -module -no-undefined -shared

$(am_mod_google_tts_la_OBJECTS): mod_google_tts.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<configuration name="google_tts.conf" description="">
<settings>
<param name="api-url" value="https://texttospeech.googleapis.com/v1/text:synthesize?fields=audioContent&key=${api-key}" />
<param name="api-key" value="---YOUR-API-KEY---" />

<param name="connect-timeout" value="5" />
<param name="request-timeout" value="10" />
<param name="file-size-max" value="2097152" />
<param name="log-http-errors" value="true" />
<!-- <param name="proxy" value="http://proxy:port" /> -->
<!-- <param name="proxy-credentials" value="" /> -->
<!-- <param name="user-agent" value="Mozilla/1.0" /> -->

<param name="cache-path" value="/tmp/google-tts-cache" />
<param name="cache-enable" value="false" />

<!-- encoding: [mp3, wav, ulaw, alaw] -->
<param name="encoding" value="mp3" />
<!-- default gender, [male, female] -->
<param name="gender" value="female" />
<!-- allows to use speak 'voice' as a language code -->
<param name="voice-name-as-language" value="true" />

</settings>
</configuration>
8 changes: 8 additions & 0 deletions src/mod/asr_tts/mod_google_tts/conf/dialplan/example.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

<extension name="google-tts">
<condition field="destination_number" expression="^(3123)$">
<action application="answer"/>
<action application="speak" data="google|en|Hello world!"/>
<action application="hangup"/>
</condition>
</extension>
Loading