Update config.py
Browse files
config.py
CHANGED
@@ -1,19 +1,10 @@
|
|
1 |
import os
|
2 |
|
3 |
-
# Audio Configuration
|
4 |
-
SAMPLE_RATE = 16000
|
5 |
-
CHUNK_SIZE = 1024
|
6 |
-
AUDIO_FORMAT = 8 # pyaudio.paInt16
|
7 |
-
CHANNELS = 1
|
8 |
-
INPUT_DEVICE_INDEX = 0 # Default microphone
|
9 |
-
RECORDINGS_DIR = "recordings"
|
10 |
-
MIN_PROCESSING_DURATION = 2 # Minimum seconds of audio to process
|
11 |
-
BUFFER_DURATION = 10 # Max seconds to buffer
|
12 |
-
|
13 |
# Speech Recognition Configuration
|
14 |
ENERGY_THRESHOLD = 300 # Minimum audio energy to consider for speech
|
15 |
DYNAMIC_ENERGY_THRESHOLD = True
|
16 |
PAUSE_THRESHOLD = 0.8 # Seconds of silence before considering speech ended
|
|
|
17 |
|
18 |
# AI Configuration
|
19 |
SUMMARY_MIN_LENGTH = 100
|
@@ -31,4 +22,5 @@ EMAIL_SENDER = "[email protected]"
|
|
31 |
EMAIL_PASSWORD = "your-app-password" # Use app-specific password
|
32 |
|
33 |
# Create necessary directories
|
34 |
-
os.
|
|
|
|
1 |
import os
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
# Speech Recognition Configuration
|
4 |
ENERGY_THRESHOLD = 300 # Minimum audio energy to consider for speech
|
5 |
DYNAMIC_ENERGY_THRESHOLD = True
|
6 |
PAUSE_THRESHOLD = 0.8 # Seconds of silence before considering speech ended
|
7 |
+
PHRASE_TIME_LIMIT = 10 # Maximum seconds per phrase
|
8 |
|
9 |
# AI Configuration
|
10 |
SUMMARY_MIN_LENGTH = 100
|
|
|
22 |
EMAIL_PASSWORD = "your-app-password" # Use app-specific password
|
23 |
|
24 |
# Create necessary directories
|
25 |
+
if not os.path.exists("recordings"):
|
26 |
+
os.makedirs("recordings")
|