
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
pip install Django-Gtts
git clone https://github.com/mrf345/django_gtts.git
cd django_gtts
python setup.py install
settings.py
in INSTALLED_APPS
:INSTALLED_APPS = [
'gTTS',
...
]
After adding the app make sure to do migration for caching model :
python manage.py makemigrations gTTS
python manage.py migrate gTTS
NOTE:
load gTTS
should be used once in the begining of every template that usessay
, Or once in the begining of the base template.
{% load gTTS %}
<audio
src="{% say 'en-us' 'text to say' %}"
controls
></audio>
urls.py
:from django.urls import path, include
urlpatterns = [
...
# for unauthorized access dynamic translation
path('gtts/', include('gTTS.urls')),
# for user authorized dynamic translation
path('gtts_auth/', include('gTTS.urls_auth')),
...
]
now you can access
http://localhost:8000/<language>/<text>
and, it should return json response{'mp3': 'static mp3 link'}
from gTTS.cache import remove_cache
remove_cache()
say(
language='en-us', # language to convert text to
text='say hi'): # text to be converted`_<br />
'af' : 'Afrikaans' 'sq' : 'Albanian' 'ar' : 'Arabic' 'hy' : 'Armenian' 'bn' : 'Bengali' 'ca' : 'Catalan' 'zh' : 'Chinese' 'zh-cn' : 'Chinese (Mandarin/China)' 'zh-tw' : 'Chinese (Mandarin/Taiwan)' 'zh-yue' : 'Chinese (Cantonese)' 'hr' : 'Croatian' 'cs' : 'Czech' 'da' : 'Danish' 'nl' : 'Dutch' 'en' : 'English' 'en-au' : 'English (Australia)' 'en-uk' : 'English (United Kingdom)' 'en-us' : 'English (United States)' 'eo' : 'Esperanto' 'fi' : 'Finnish' 'fr' : 'French' 'de' : 'German' 'el' : 'Greek' 'hi' : 'Hindi' 'hu' : 'Hungarian' 'is' : 'Icelandic' 'id' : 'Indonesian' 'it' : 'Italian' 'ja' : 'Japanese' 'km' : 'Khmer (Cambodian)' 'ko' : 'Korean' 'la' : 'Latin' 'lv' : 'Latvian' 'mk' : 'Macedonian' 'no' : 'Norwegian' 'pl' : 'Polish' 'pt' : 'Portuguese' 'ro' : 'Romanian' 'ru' : 'Russian' 'sr' : 'Serbian' 'si' : 'Sinhala' 'sk' : 'Slovak' 'es' : 'Spanish' 'es-es' : 'Spanish (Spain)' 'es-us' : 'Spanish (United States)' 'sw' : 'Swahili' 'sv' : 'Swedish' 'ta' : 'Tamil' 'th' : 'Thai' 'tr' : 'Turkish' 'uk' : 'Ukrainian' 'vi' : 'Vietnamese' 'cy' : 'Welsh'
- gTTS: Python Google text-to-speech
FAQs
gTTS google text-to-speech django app
We found that Django-Gtts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.