- Added support for Faster Whisper transcription via Jigasi and Skynet. - Updated .env.example to include new environment variables for transcription settings. - Enhanced Jitsi Docker Compose configuration to include Skynet and Jigasi services. - Introduced new API endpoints for managing organizational folders in the drive service. - Updated Nextcloud initialization script to enable external file mounting. - Improved error handling and response structures in the drive API. - Added new properties for organization settings related to transcription and agenda management.
45 lines
1.4 KiB
Go
45 lines
1.4 KiB
Go
package meet
|
|
|
|
import (
|
|
"strings"
|
|
"unicode/utf8"
|
|
|
|
"github.com/ultisuite/ulti-backend/internal/api/apivalidate"
|
|
)
|
|
|
|
type transcriptRequest struct {
|
|
RoomID string `json:"room_id"`
|
|
OrganizerUserID string `json:"organizer_user_id"`
|
|
OrganizerEmail string `json:"organizer_email"`
|
|
ParticipantEmails []string `json:"participant_emails"`
|
|
Transcript string `json:"transcript"`
|
|
Mode string `json:"mode"`
|
|
QueuedAudioURL string `json:"queued_audio_url"`
|
|
}
|
|
|
|
func validateTranscriptRequest(req *transcriptRequest) *apivalidate.ValidationError {
|
|
room := strings.TrimSpace(req.RoomID)
|
|
if room == "" {
|
|
return apivalidate.NewValidationError(apivalidate.FieldDetail{
|
|
Field: "room_id", Message: "required",
|
|
})
|
|
}
|
|
if utf8.RuneCountInString(room) > 256 {
|
|
return apivalidate.NewValidationError(apivalidate.FieldDetail{
|
|
Field: "room_id", Message: "too long",
|
|
})
|
|
}
|
|
mode := strings.TrimSpace(req.Mode)
|
|
if mode != "" && mode != "live" && mode != "queued" {
|
|
return apivalidate.NewValidationError(apivalidate.FieldDetail{
|
|
Field: "mode", Message: "must be live or queued",
|
|
})
|
|
}
|
|
if strings.TrimSpace(req.Transcript) == "" && strings.TrimSpace(req.QueuedAudioURL) == "" {
|
|
return apivalidate.NewValidationError(apivalidate.FieldDetail{
|
|
Field: "transcript", Message: "transcript or queued_audio_url required",
|
|
})
|
|
}
|
|
return nil
|
|
}
|