mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 08:16:38 +00:00
stt init (#2306)
* stt init * fix: limits * fix: errors * fix: error messages
This commit is contained in:
38 files changed
+3096
-188
No files matched your search
@@ -65,6 +65,8 @@ Here are some of the most fundamental settings you'll likely want to configure:
|
||||
|
||||
- **`OPENAI_BASE_URL`**: Specifically used when `LLM_PROVIDER` is set to `openai` but you are connecting to a local inference engine (like Ollama, Llama.cpp, etc.) that exposes an OpenAI-compatible API. This setting tells DocsGPT where to find your local LLM server.
|
||||
|
||||
- **`STT_PROVIDER`**: Selects the speech-to-text provider used for microphone transcription in chat and for audio file ingestion through the parser pipeline.
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
Let's look at some concrete examples of how to configure these settings in your `.env` file.
|
||||
@@ -95,6 +97,49 @@ EMBEDDINGS_NAME=huggingface_sentence-transformers/all-mpnet-base-v2 # You can al
|
||||
|
||||
In this case, even though you are using Ollama locally, `LLM_PROVIDER` is set to `openai` because Ollama (and many other local inference engines) are designed to be API-compatible with OpenAI. `OPENAI_BASE_URL` points DocsGPT to the local Ollama server.
|
||||
|
||||
## Speech-to-Text Settings
|
||||
|
||||
DocsGPT can transcribe audio in two places:
|
||||
|
||||
- Voice input in the chat.
|
||||
- Audio file ingestion. Uploaded `.wav`, `.mp3`, `.m4a`, `.ogg`, and `.webm` files are transcribed first and then passed through the normal parser, chunking, embedding, and indexing pipeline.
|
||||
|
||||
For an end-to-end walkthrough, see the [Speech and Audio Guide](/Guides/speech-and-audio).
|
||||
|
||||
| Setting | Purpose | Typical values |
|
||||
| --- | --- | --- |
|
||||
| `STT_PROVIDER` | Speech-to-text backend provider. | `openai`, `faster_whisper` |
|
||||
| `OPENAI_STT_MODEL` | OpenAI transcription model used when `STT_PROVIDER=openai`. | `gpt-4o-mini-transcribe` |
|
||||
| `STT_LANGUAGE` | Optional language hint passed to the provider. Leave unset for auto-detection when supported. | `en`, `es`, unset |
|
||||
| `STT_MAX_FILE_SIZE_MB` | Maximum file size accepted by the synchronous `/api/stt` endpoint. | `25` |
|
||||
| `STT_ENABLE_TIMESTAMPS` | Include timestamp segments in the normalized transcript response and stored parser metadata. | `true`, `false` |
|
||||
| `STT_ENABLE_DIARIZATION` | Reserved provider option for speaker diarization. Some providers may ignore it. | `true`, `false` |
|
||||
|
||||
### Example: OpenAI Speech-to-Text
|
||||
|
||||
```env
|
||||
STT_PROVIDER=openai
|
||||
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
||||
OPENAI_STT_MODEL=gpt-4o-mini-transcribe
|
||||
STT_LANGUAGE=
|
||||
STT_MAX_FILE_SIZE_MB=25
|
||||
STT_ENABLE_TIMESTAMPS=false
|
||||
STT_ENABLE_DIARIZATION=false
|
||||
```
|
||||
|
||||
If you already use `API_KEY` for OpenAI, DocsGPT can reuse that key for transcription. Set `OPENAI_API_KEY` only when you want a dedicated key.
|
||||
|
||||
### Example: Local `faster_whisper`
|
||||
|
||||
```env
|
||||
STT_PROVIDER=faster_whisper
|
||||
STT_LANGUAGE=en
|
||||
STT_ENABLE_TIMESTAMPS=true
|
||||
STT_ENABLE_DIARIZATION=false
|
||||
```
|
||||
|
||||
`faster_whisper` is an optional backend dependency. Install it in the Python environment used by the DocsGPT API and worker before selecting this provider.
|
||||
|
||||
## Authentication Settings
|
||||
|
||||
DocsGPT includes a JWT (JSON Web Token) based authentication feature for managing sessions or securing local deployments while allowing access.
|
||||
@@ -180,4 +225,3 @@ These are just the basic settings to get you started. The `settings.py` file con
|
||||
|
||||
For a complete list of available settings and their descriptions, refer to the `settings.py` file in `application/core`. Remember to restart your Docker containers after making changes to your `.env` file or `settings.py` for the changes to take effect.
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ export const allGuides = {
|
||||
|
||||
# **DocsGPT 🦖**
|
||||
|
||||
DocsGPT is an open-source genAI tool that helps users get reliable answers from any knowledge source, while avoiding hallucinations. It enables quick and reliable information retrieval, with tooling and agentic system capability built in.
|
||||
DocsGPT is an open-source genAI tool that helps users get reliable answers from any knowledge source, while avoiding hallucinations. It enables quick and reliable information retrieval, with tooling and agentic system capability built in, including speech-to-text workflows for chat and audio knowledge ingestion.
|
||||
|
||||
|
||||
<video controls width={1920} height={1080} muted autoPlay loop playsInline>
|
||||
@@ -71,7 +71,8 @@ DocsGPT is an open-source genAI tool that helps users get reliable answers from
|
||||
Try it yourself: [https://www.docsgpt.cloud/](https://www.docsgpt.cloud/)
|
||||
|
||||
### Features:
|
||||
- **🗂️ Wide Format Support:** Reads PDF, DOCX, CSV, XLSX, EPUB, MD, RST, HTML, MDX, JSON, PPTX, and images.
|
||||
- **🗂️ Wide Format Support:** Reads PDF, DOCX, CSV, XLSX, EPUB, MD, RST, HTML, MDX, JSON, PPTX, images, and audio files such as MP3, WAV, M4A, OGG, and WebM.
|
||||
- **🎙️ Speech Workflows:** Record voice input into chat, transcribe on the backend, and index uploaded audio files as searchable source material.
|
||||
- **🌐 Web & Data Integration:** Ingests from URLs, sitemaps, Reddit, GitHub and web crawlers.
|
||||
- **✅ Reliable Answers:** Get accurate, hallucination-free responses with source citations viewable in a clean UI.
|
||||
- **🔑 Streamlined API Keys:** Generate keys linked to your settings, documents, and models, simplifying chatbot and integration setup.
|
||||
|
||||
Reference in new issue
Block a user