Files
gpt4free/docs
hlohaus 099d7283ed feat: add gTTS provider and update EdgeTTS & media docs
- In **docs/media.md**:
  - Updated the import to include `gTTS` alongside `EdgeTTS`, `Gemini`, and `PollinationsAI`.
  - Changed the audio parameter for EdgeTTS from `"locale": "en-US"` to `"language": "en"`.
  - Added a new code example demonstrating how to use the gTTS provider and save the output as "google-tts.mp3".

- In **g4f/Provider/__init__.py**:
  - Replaced the import of `EdgeTTS` with a wildcard import (`from .audio import *`) to include all audio providers.

- In **g4f/Provider/audio/EdgeTTS.py**:
  - Added a new class attribute `model_id = "edge-tts"`.
  - Changed the voice selection logic to use `cls.model_id` instead of the hardcoded string "edge-tts".
  - Updated the filename generation to use `[cls.model_id]` instead of `[cls.default_model]`.

- In **g4f/Provider/audio/__init__.py**:
  - Added an import for the new `gTTS` provider.

- Added new file **g4f/Provider/audio/gTTS.py**:
  - Implements the gTTS provider using the `gtts` library.
  - Defines provider attributes (`label`, `working`, `model_id`, etc.) and generates audio using a similar structure to EdgeTTS.

- In **g4f/image/__init__.py**:
  - Modified the `get_extension` function to extract the extension using `.lower().lstrip('.')` instead of slicing with `[1:]`.
2025-04-19 14:40:53 +02:00
..
2024-05-03 11:06:01 -04:00
2024-12-07 03:01:43 +01:00
2025-03-30 17:57:42 +02:00
2024-11-17 11:06:37 +01:00
2025-03-30 15:40:46 +02:00
2025-02-21 09:53:56 +01:00
2025-03-11 02:49:24 +01:00
2025-02-21 09:56:20 +01:00
2024-12-13 22:20:58 +01:00
2024-04-06 10:47:43 +02:00