File size: 953 Bytes
cf86922 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import os
# Audio Configuration
SAMPLE_RATE = 16000
CHUNK_SIZE = 1024
AUDIO_FORMAT = 8 # pyaudio.paInt16
CHANNELS = 1
INPUT_DEVICE_INDEX = 0 # Default microphone
RECORDINGS_DIR = "recordings"
MIN_PROCESSING_DURATION = 2 # Minimum seconds of audio to process
BUFFER_DURATION = 10 # Max seconds to buffer
# Speech Recognition Configuration
ENERGY_THRESHOLD = 300 # Minimum audio energy to consider for speech
DYNAMIC_ENERGY_THRESHOLD = True
PAUSE_THRESHOLD = 0.8 # Seconds of silence before considering speech ended
# AI Configuration
SUMMARY_MIN_LENGTH = 100
SUMMARY_MAX_LENGTH = 300
# Notification Configuration
NOTIFICATION_RECIPIENTS = [
{"type": "email", "address": "[email protected]"}
]
# Email Configuration
SMTP_SERVER = "smtp.gmail.com"
SMTP_PORT = 587
EMAIL_SENDER = "[email protected]"
EMAIL_PASSWORD = "your-app-password" # Use app-specific password
# Create necessary directories
os.makedirs(RECORDINGS_DIR, exist_ok=True) |