Skip to content

Commit cbddf3b

Browse files
committed
docs: update realtime tuning configuration
1 parent d0d49b7 commit cbddf3b

3 files changed

Lines changed: 61 additions & 26 deletions

File tree

.env.example

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,21 @@ GROQ_TRANSCRIPTION_MODEL=whisper-large-v3-turbo
33
GROQ_TRANSLATION_MODEL=llama-3.1-8b-instant
44

55
# Optional transcription tuning
6-
# GROQ_TRANSCRIPTION_LANGUAGE=id
7-
# GROQ_TRANSCRIPTION_TEMPERATURE=0
8-
# GROQ_TRANSCRIPTION_PROMPT=Conversation with technical terms and product names.
6+
# RTDT_TRANSCRIPTION_MODE=fast
7+
# RTDT_TRANSCRIPTION_LANGUAGE=en
8+
# RTDT_TRANSCRIPTION_TEMPERATURE=0
9+
# RTDT_TRANSCRIPTION_PROMPT=This is an English motivational speech. Common words: power of words, adversity, opportunity, weakness, strength, disabled, differently abled, disability.
910

1011
# Optional realtime tuning
11-
# RTDT_RECORD_TIMEOUT=1.4
12-
# RTDT_PHRASE_TIMEOUT=5.0
13-
# RTDT_PAUSE_THRESHOLD=0.65
14-
# RTDT_MIN_AUDIO_SECONDS=0.45
12+
# RTDT_RECORD_TIMEOUT=1.0
13+
# RTDT_PHRASE_TIMEOUT=3.0
14+
# RTDT_PAUSE_THRESHOLD=0.50
15+
# RTDT_MIN_AUDIO_SECONDS=0.30
1516
# RTDT_MIN_AUDIO_RMS=120
16-
# RTDT_TRANSLATION_SILENCE_DELAY=5.0
17+
# RTDT_MIN_MIC_RMS=120
18+
# RTDT_MIN_SPEAKER_RMS=90
19+
# RTDT_ENABLE_AUDIO_NORMALIZATION=1
20+
# RTDT_TARGET_AUDIO_RMS=800
21+
# RTDT_PRIORITIZE_SPEAKER=1
22+
# RTDT_UI_REFRESH_MS=150
23+
# RTDT_PROCESSING_STATUS_DELAY=0.15

README.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The application displays a real-time transcript in a desktop UI and can optional
1515
- Local transcription mode with Faster Whisper
1616
- API transcription mode with Groq or another OpenAI-compatible endpoint
1717
- Optional Indonesian translation for each finalized transcript block
18-
- Configurable silence delay, phrase timeout, audio filtering, and transcription model
18+
- Configurable fast/accurate transcription mode, language, prompt context, phrase timeout, audio filtering, and UI refresh
1919
- Secret-safe local configuration through `.env` or `keys.py`
2020
- Built-in unit tests for transcript state and API authentication handling
2121

@@ -80,6 +80,15 @@ GROQ_TRANSCRIPTION_MODEL=whisper-large-v3-turbo
8080
GROQ_TRANSLATION_MODEL=llama-3.1-8b-instant
8181
```
8282

83+
For mode-based model selection, set:
84+
85+
```env
86+
RTDT_TRANSCRIPTION_MODE=fast
87+
```
88+
89+
Use `fast` for lower latency (`whisper-large-v3-turbo`) or `accurate` for better accuracy (`whisper-large-v3`).
90+
When `RTDT_TRANSCRIPTION_MODE` is set, it selects the Groq transcription model. Without it, an explicit `GROQ_TRANSCRIPTION_MODEL` value is used.
91+
8392
OpenAI-compatible endpoint example:
8493

8594
```env
@@ -101,23 +110,32 @@ Keep real credentials local. `.env` and `keys.py` are ignored by Git and should
101110
These values are optional and can be added to `.env` when needed:
102111

103112
```env
104-
GROQ_TRANSCRIPTION_LANGUAGE=id
105-
GROQ_TRANSCRIPTION_TEMPERATURE=0
106-
GROQ_TRANSCRIPTION_PROMPT=Conversation with technical terms and product names.
107-
108-
RTDT_RECORD_TIMEOUT=1.4
109-
RTDT_PHRASE_TIMEOUT=5.0
110-
RTDT_PAUSE_THRESHOLD=0.65
111-
RTDT_MIN_AUDIO_SECONDS=0.45
113+
RTDT_TRANSCRIPTION_MODE=fast
114+
RTDT_TRANSCRIPTION_LANGUAGE=en
115+
RTDT_TRANSCRIPTION_TEMPERATURE=0
116+
RTDT_TRANSCRIPTION_PROMPT=This is an English motivational speech. Common words: power of words, adversity, opportunity, weakness, strength, disabled, differently abled, disability.
117+
118+
RTDT_RECORD_TIMEOUT=1.0
119+
RTDT_PHRASE_TIMEOUT=3.0
120+
RTDT_PAUSE_THRESHOLD=0.50
121+
RTDT_MIN_AUDIO_SECONDS=0.30
112122
RTDT_MIN_AUDIO_RMS=120
113-
RTDT_TRANSLATION_SILENCE_DELAY=5.0
123+
RTDT_MIN_MIC_RMS=120
124+
RTDT_MIN_SPEAKER_RMS=90
125+
RTDT_ENABLE_AUDIO_NORMALIZATION=1
126+
RTDT_TARGET_AUDIO_RMS=800
127+
RTDT_PRIORITIZE_SPEAKER=1
128+
RTDT_UI_REFRESH_MS=150
129+
RTDT_PROCESSING_STATUS_DELAY=0.15
114130
```
115131

116132
Model recommendation:
117133

118134
- `whisper-large-v3-turbo` for lower latency
119135
- `whisper-large-v3` for higher accuracy
120136

137+
Set `RTDT_TRANSCRIPTION_LANGUAGE=auto` to let the provider detect the language. For English video/audio, prefer `en` or `auto`; do not force `id` unless the source audio is Indonesian.
138+
121139
## Running the Application
122140

123141
Run local transcription mode:
@@ -189,9 +207,9 @@ ffmpeg -version
189207

190208
The application captures the default Windows speaker output through WASAPI loopback. Set the target output device as the Windows default speaker before starting the app.
191209

192-
### Transcription is delayed
210+
### Translation is delayed
193211

194-
Transcript blocks are finalized after a silence delay. Lower `RTDT_TRANSLATION_SILENCE_DELAY` and `RTDT_PHRASE_TIMEOUT` for faster updates, or increase them for more stable sentence grouping.
212+
Translation runs when you click the `Selesai` button. While speaking, the active transcript block keeps updating and the translation field waits for that manual finish action.
195213

196214
## Security Notes
197215

keys.example.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@
33
GROQ_TRANSLATION_MODEL = "llama-3.1-8b-instant"
44

55
# Optional tuning:
6-
# GROQ_TRANSCRIPTION_LANGUAGE = "id"
7-
# GROQ_TRANSCRIPTION_TEMPERATURE = "0"
8-
# GROQ_TRANSCRIPTION_PROMPT = "Conversation with technical terms and product names."
9-
# RTDT_RECORD_TIMEOUT = "1.4"
10-
# RTDT_PHRASE_TIMEOUT = "5.0"
11-
# RTDT_TRANSLATION_SILENCE_DELAY = "5.0"
6+
# RTDT_TRANSCRIPTION_MODE = "fast"
7+
# RTDT_TRANSCRIPTION_LANGUAGE = "en"
8+
# RTDT_TRANSCRIPTION_TEMPERATURE = "0"
9+
# RTDT_TRANSCRIPTION_PROMPT = "This is an English motivational speech. Common words: power of words, adversity, opportunity, weakness, strength, disabled, differently abled, disability."
10+
# RTDT_RECORD_TIMEOUT = "1.0"
11+
# RTDT_PHRASE_TIMEOUT = "3.0"
12+
# RTDT_PAUSE_THRESHOLD = "0.50"
13+
# RTDT_MIN_AUDIO_SECONDS = "0.30"
14+
# RTDT_MIN_AUDIO_RMS = "120"
15+
# RTDT_MIN_MIC_RMS = "120"
16+
# RTDT_MIN_SPEAKER_RMS = "90"
17+
# RTDT_ENABLE_AUDIO_NORMALIZATION = "1"
18+
# RTDT_TARGET_AUDIO_RMS = "800"
19+
# RTDT_PRIORITIZE_SPEAKER = "1"
20+
# RTDT_UI_REFRESH_MS = "150"
21+
# RTDT_PROCESSING_STATUS_DELAY = "0.15"

0 commit comments

Comments
 (0)