fix(telegram): separate voice transcription client (#166)
This commit is contained in:
@@ -9,6 +9,10 @@ Enable transcription so voice notes become normal text runs.
|
||||
```sh
|
||||
takopi config set transports.telegram.voice_transcription true
|
||||
takopi config set transports.telegram.voice_transcription_model "gpt-4o-mini-transcribe"
|
||||
|
||||
# local OpenAI-compatible transcription server (optional)
|
||||
takopi config set transports.telegram.voice_transcription_base_url "http://localhost:8000/v1"
|
||||
takopi config set transports.telegram.voice_transcription_api_key "local"
|
||||
```
|
||||
|
||||
=== "toml"
|
||||
@@ -17,13 +21,17 @@ Enable transcription so voice notes become normal text runs.
|
||||
[transports.telegram]
|
||||
voice_transcription = true
|
||||
voice_transcription_model = "gpt-4o-mini-transcribe" # optional
|
||||
voice_transcription_base_url = "http://localhost:8000/v1" # optional
|
||||
voice_transcription_api_key = "local" # optional
|
||||
```
|
||||
|
||||
Set `OPENAI_API_KEY` in your environment (uses OpenAI’s transcription API).
|
||||
Set `OPENAI_API_KEY` in your environment (or `voice_transcription_api_key` in config).
|
||||
|
||||
To use a local OpenAI-compatible Whisper server, also set `OPENAI_BASE_URL`
|
||||
(for example, `http://localhost:8000/v1`) and a dummy `OPENAI_API_KEY` if your server ignores it.
|
||||
If your server requires a specific model name, set `voice_transcription_model` (for example, `whisper-1`).
|
||||
To use a local OpenAI-compatible Whisper server, set `voice_transcription_base_url`
|
||||
(and `voice_transcription_api_key` if the server expects one). This keeps engine
|
||||
requests on their own base URL without relying on `OPENAI_BASE_URL`. If your server
|
||||
requires a specific model name, set `voice_transcription_model` (for example,
|
||||
`whisper-1`).
|
||||
|
||||
## Behavior
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ If you expect to edit config while Takopi is running, set:
|
||||
| `voice_transcription` | bool | `false` | Enable voice note transcription. |
|
||||
| `voice_max_bytes` | int | `10485760` | Max voice note size (bytes). |
|
||||
| `voice_transcription_model` | string | `"gpt-4o-mini-transcribe"` | OpenAI transcription model name. |
|
||||
| `voice_transcription_base_url` | string\|null | `null` | Override base URL for voice transcription only. |
|
||||
| `voice_transcription_api_key` | string\|null | `null` | Override API key for voice transcription only. |
|
||||
| `session_mode` | `"stateless"`\|`"chat"` | `"stateless"` | Auto-resume mode. Onboarding sets `"chat"` for assistant/workspace. |
|
||||
| `show_resume_line` | bool | `true` | Show resume line in message footer. Onboarding sets `false` for assistant/workspace. |
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ Configuration (under `[transports.telegram]`):
|
||||
```sh
|
||||
takopi config set transports.telegram.voice_transcription true
|
||||
takopi config set transports.telegram.voice_transcription_model "gpt-4o-mini-transcribe"
|
||||
|
||||
# local OpenAI-compatible transcription server (optional)
|
||||
takopi config set transports.telegram.voice_transcription_base_url "http://localhost:8000/v1"
|
||||
takopi config set transports.telegram.voice_transcription_api_key "local"
|
||||
```
|
||||
|
||||
=== "toml"
|
||||
@@ -40,16 +44,19 @@ Configuration (under `[transports.telegram]`):
|
||||
```toml
|
||||
voice_transcription = true
|
||||
voice_transcription_model = "gpt-4o-mini-transcribe" # optional
|
||||
voice_transcription_base_url = "http://localhost:8000/v1" # optional
|
||||
voice_transcription_api_key = "local" # optional
|
||||
```
|
||||
|
||||
Set `OPENAI_API_KEY` in the environment. If transcription is enabled but the API key
|
||||
is missing or the audio download fails, takopi replies with a short error and skips
|
||||
the run.
|
||||
Set `OPENAI_API_KEY` in the environment (or `voice_transcription_api_key` in config).
|
||||
If transcription is enabled but no API key is available or the audio download fails,
|
||||
takopi replies with a short error and skips the run.
|
||||
|
||||
To use a local OpenAI-compatible Whisper server, also set `OPENAI_BASE_URL` (for
|
||||
example, `http://localhost:8000/v1`) and a dummy `OPENAI_API_KEY` if your server
|
||||
ignores it. If your server requires a specific model name, set
|
||||
`voice_transcription_model` (for example, `whisper-1`).
|
||||
To use a local OpenAI-compatible Whisper server, set `voice_transcription_base_url`
|
||||
(and `voice_transcription_api_key` if the server expects one). This keeps engine
|
||||
requests on their own base URL without relying on `OPENAI_BASE_URL`. If your server
|
||||
requires a specific model name, set `voice_transcription_model` (for example,
|
||||
`whisper-1`).
|
||||
|
||||
### Trigger mode (mentions-only)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user