feat: add S3 storage support and update configuration

- Enhanced .env.example to include S3 storage configuration options.
- Updated main.go to initialize S3 client and handle audio uploads to S3.
- Modified processAudio function to return S3 URL when storage is enabled.
- Updated README.md with new S3 storage instructions and examples.
This commit is contained in:
Davidson Gomes
2024-12-02 20:14:10 -03:00
parent 30a4990e53
commit 5f3a073d76
5 changed files with 292 additions and 122 deletions

View File

@@ -2,7 +2,17 @@ PORT=4040
CORS_ALLOW_ORIGINS=*
API_KEY=429683C4C977415CAAFCCE10F7D57E11
ENABLE_TRANSCRIPTION=true
TRANSCRIPTION_PROVIDER=openai # ou groq
OPENAI_API_KEY=sua_chave_openai_aqui
GROK_API_KEY=sua_chave_groq_aqui
TRANSCRIPTION_LANGUAGE=pt
TRANSCRIPTION_PROVIDER=openai # or groq
OPENAI_API_KEY=your_openai_key_here
GROK_API_KEY=your_groq_key_here
TRANSCRIPTION_LANGUAGE=en # Default transcription language (optional)
# S3 Storage Settings
ENABLE_S3_STORAGE=true
S3_ENDPOINT=play.min.io
S3_ACCESS_KEY=your_access_key_here
S3_SECRET_KEY=your_secret_key_here
S3_BUCKET_NAME=audio-files
S3_REGION=us-east-1
S3_USE_SSL=true
S3_URL_EXPIRATION=24h # Duration format: 1h, 24h, 7d, etc.