cloudlanguagetools 6.9__tar.gz → 7.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/PKG-INFO +1 -1
  2. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/elevenlabs.py +12 -1
  3. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools.egg-info/PKG-INFO +1 -1
  4. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/setup.py +1 -1
  5. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/LICENSE +0 -0
  6. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/README.rst +0 -0
  7. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/__init__.py +0 -0
  8. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/amazon.py +0 -0
  9. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/argostranslate.py +0 -0
  10. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/azure.py +0 -0
  11. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/cereproc.py +0 -0
  12. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/chatapi.py +0 -0
  13. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/constants.py +0 -0
  14. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/deepl.py +0 -0
  15. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/dictionarylookup.py +0 -0
  16. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/easypronunciation.py +0 -0
  17. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/encryption.py +0 -0
  18. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/epitran.py +0 -0
  19. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/errors.py +0 -0
  20. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/forvo.py +0 -0
  21. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/fptai.py +0 -0
  22. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/google.py +0 -0
  23. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/keys.py +0 -0
  24. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/languages.py +0 -0
  25. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/libretranslate.py +0 -0
  26. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/mandarincantonese.py +0 -0
  27. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/naver.py +0 -0
  28. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/openai.py +0 -0
  29. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/options.py +0 -0
  30. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/pythainlp.py +0 -0
  31. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/service.py +0 -0
  32. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/servicemanager.py +0 -0
  33. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/spacy.py +0 -0
  34. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/test_services.py +0 -0
  35. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/tokenization.py +0 -0
  36. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/translationlanguage.py +0 -0
  37. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/transliterationlanguage.py +0 -0
  38. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/ttsvoice.py +0 -0
  39. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/vocalware.py +0 -0
  40. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/voicen.py +0 -0
  41. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/watson.py +0 -0
  42. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools/wenlin.py +0 -0
  43. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools.egg-info/SOURCES.txt +0 -0
  44. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools.egg-info/dependency_links.txt +0 -0
  45. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools.egg-info/requires.txt +0 -0
  46. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/cloudlanguagetools.egg-info/top_level.txt +0 -0
  47. {cloudlanguagetools-6.9 → cloudlanguagetools-7.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudlanguagetools
3
- Version: 6.9
3
+ Version: 7.0
4
4
  Summary: Interface with various cloud APIs for language processing such as translation, text to speech
5
5
  Home-page: https://github.com/Language-Tools/cloud-language-tools-core
6
6
  Author: Luc
@@ -99,6 +99,12 @@ class ElevenLabsService(cloudlanguagetools.service.Service):
99
99
  }
100
100
 
101
101
  response = requests.post(url, json=data, headers=headers, timeout=cloudlanguagetools.constants.RequestTimeout)
102
+ if response.status_code != 200:
103
+ error_message = f'ElevenLabs: error processing TTS request: {response.status_code} {response.text}'
104
+ logger.error(error_message)
105
+ raise cloudlanguagetools.errors.RequestError(error_message)
106
+
107
+
102
108
  response.raise_for_status()
103
109
 
104
110
  output_temp_file = tempfile.NamedTemporaryFile()
@@ -144,6 +150,11 @@ class ElevenLabsService(cloudlanguagetools.service.Service):
144
150
  response = requests.get(url, headers=self.get_headers(), timeout=cloudlanguagetools.constants.RequestTimeout)
145
151
  response.raise_for_status()
146
152
  model_data = response.json()
153
+
154
+ # restrict to models that can do text to speech (elevenlabs introduced voice conversion)
155
+ model_data = [model for model in model_data if model['can_do_text_to_speech']]
156
+
157
+ #pprint.pprint(model_data)
147
158
  # model_data:
148
159
  # [{'can_be_finetuned': True,
149
160
  # 'can_do_text_to_speech': True,
@@ -185,7 +196,7 @@ class ElevenLabsService(cloudlanguagetools.service.Service):
185
196
  for model in model_data:
186
197
  model_id = model['model_id']
187
198
  model_name = model['name']
188
- model_short_name = model_name.replace('Eleven ', '').replace('v1', '').strip()
199
+ model_short_name = model_name.replace('Eleven ', '').strip()
189
200
  for language_record in model['languages']:
190
201
  try:
191
202
  language_id = language_record['language_id']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudlanguagetools
3
- Version: 6.9
3
+ Version: 7.0
4
4
  Summary: Interface with various cloud APIs for language processing such as translation, text to speech
5
5
  Home-page: https://github.com/Language-Tools/cloud-language-tools-core
6
6
  Author: Luc
@@ -6,7 +6,7 @@ from setuptools.command.install import install
6
6
  # twine upload dist/*
7
7
 
8
8
  setup(name='cloudlanguagetools',
9
- version='6.9',
9
+ version='7.0',
10
10
  description='Interface with various cloud APIs for language processing such as translation, text to speech',
11
11
  long_description=open('README.rst', encoding='utf-8').read(),
12
12
  url='https://github.com/Language-Tools/cloud-language-tools-core',