diff --git a/Dockerfile b/Dockerfile index 2b6c105..7376531 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ FROM python:3.11-slim LABEL maintainer="Jacob Schmieder" LABEL email="Jacob.Schmieder@dbfz.de" LABEL version="0.1.1.dev" -LABEL description="Scraibe: LocalAI-backed transcription and diarization client with summarization. \ +LABEL description="Scraibe: LocalAI-backed transcription and diarization client with summarization and custom Web GUI. \ Sends audio to a LocalAI server running vibevoice.cpp and uses a second LLM for summarization." -LABEL url="https://github.com/JSchmie/ScrAIbe" +LABEL url="https://git.optimex.systems/admin/scribe" # Install system dependencies (ffmpeg required) RUN apt update -y && \ @@ -16,27 +16,32 @@ RUN apt update -y && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Working directory -WORKDIR /app +WORKDIR /app/src # Environment variables for LocalAI (transcription/diarization) -# Set these via docker run -e or docker-compose ENV LOCALAI_API_URL=http://localhost:8080 ENV LOCALAI_API_KEY= -ENV LOCALAI_MODEL=vibevoice-diarize +ENV LOCALAI_MODEL=vibevoice-cpp-asr # Environment variables for Summarizer LLM ENV SUMMARIZER_API_URL=http://localhost:8080 ENV SUMMARIZER_API_KEY= -ENV SUMMARIZER_MODEL=llama-3.1-8b-instruct +ENV SUMMARIZER_MODEL=qwen3-14b + +# Gradio / Web GUI +ENV GRADIO_SERVER_NAME=0.0.0.0 # Copy and install Python dependencies -COPY requirements.txt /app/requirements.txt +COPY requirements.txt /app/src/requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy application code -COPY scraibe /app/scraibe +COPY scraibe /app/src/scraibe -# Expose port (if UI is served) +# Copy custom Web GUI assets (header, footer, templates, logos, config) +COPY misc /app/src/misc + +# Expose port (for Web GUI) EXPOSE 7860 # Run the application diff --git a/misc/config.yaml b/misc/config.yaml new file mode 100644 index 0000000..d03dbbb --- /dev/null +++ b/misc/config.yaml @@ -0,0 +1,101 @@ +## Custom configuration for A.P.Strom Transcription (LocalAI-backed) +## Lines that start with ## are comment lines. + +interface_type: async # async or simple (one does transcriptions, requires Email setup) + +launch: + ## Gradio launch options (if using WebUI) + # server_port: null + # server_name: "A.P.Strom Transcription" + # inline: false + # inbrowser: false + # share: false + # debug: false + max_threads: 18 + # quiet: false + # auth: null # tuple of username and password + # auth_message: null + # prevent_thread_lock: false + # show_error: false + # height: 500 + # width: 100% + favicon_path: /app/src/misc/logo.png + # ssl_keyfile: null + # ssl_certfile: null + # ssl_keyfile_password: null + # ssl_verify: false + # show_api: false + # allowed_paths: + # blocked_paths: null + # root_path: null + # app_kwargs: null + # state_session_capacity: 10000 + # share_server_address: null + # share_server_protocol: null + # max_file_size: null + # enable_monitoring: null + +queue: + ## Queue configuration + # status_update_rate: 'auto' + # api_open: null + max_size: 10 + # default_concurrency_limit: + +layout: + show_settings: false + header: /app/src/misc/header.html + header_format_options: + header_logo_url: https://apstrom.ca/ + header_logo_src: /app/src/misc/logo.png + footer: /app/src/misc/footer.html + footer_format_options: + # footer_css_path: /app/src/misc/footer_style.css + footer_scraibe_webui_version: "0.1.1-dev" + +scraibe_params: + ## LocalAI (transcription + diarization) + localai_api_url: http://localhost:8080 + localai_api_key: "" + localai_model: vibevoice-cpp-asr + + ## Summarizer LLM (for transcript_and_summarize) + summarizer_api_url: http://localhost:8080 + summarizer_api_key: "" + summarizer_model: qwen3-14b + + ## Legacy Whisper/Pyannote fields (ignored by LocalAI client; kept for compatibility) + whisper_model: large-v3 + whisper_type: whisper + dia_model: null + use_auth_token: null + device: cpu + num_threads: 18 + +mail: + sender_email: scribe@apstrom.ca + smtp_server: mail.apstrom.ca + smtp_port: 587 + sender_password: "" + connection_type: TLS # 'SSL', 'TLS', or 'PLAIN' + context: default + default_subject: "A.P.Strom audio transcription" + error_template: /app/src/misc/error_notification_template.html + error_subject: "error" + error_format_options: + ## exception is mandatory for your html; will be set to the related exception in the Code + contact_email: support@apstrom.ca + success_template: /app/src/misc/success_template.html + success_subject: "ready" + success_format_options: + contact_email: info@apstrom.ca + upload_notification_template: /app/src/misc/upload_notification_template.html + upload_subject: "upload successful" + upload_notification_format_options: + queue_position: null + contact_email: info@apstrom.ca + # mail_css_path: /app/src/misc/mail_style.css + +advanced: + keep_model_alive: false # for sync interface only; keeps the model alive during a session + concurrent_workers_async: 2 # number of concurrent working threads in the async interface diff --git a/misc/error_notification_template.html b/misc/error_notification_template.html new file mode 100644 index 0000000..969965a --- /dev/null +++ b/misc/error_notification_template.html @@ -0,0 +1,87 @@ + + +
+ + +Dear user:
+An error occurred while processing your audio file. This means that something went wrong during the processing of your file, and it could not be completed successfully.
+ +Please check the file and try again. If the problem persists, our support team is here to help.
+You can contact our support team at {contact_email}. They are available to assist with any questions or issues you may have.
+Please note that our support team does not have the ability to fix processing errors directly or access the files you have uploaded. They can provide guidance and help troubleshoot any issues you may encounter.
+Thank you for using our transcription service!
+A.P.Strom
++ Upload, record, or provide a video with audio for transcription. Our toolkit is designed to transcribe content from multiple languages accurately. The integrated speaker diarisation feature identifies different speakers, ensuring a smooth transcription experience. For optimal results, indicate the number of speakers and the original language of the content. +
+Dear user:
+Your file has been successfully processed, and the transcript is now ready. The transcript of your audio or video file is attached to this email.
+We hope you find the transcript useful. If you have any questions or need further assistance, please do not hesitate to contact our support team.
+You can reach our support team at {contact_email}. They are available to help with any questions or issues you may have.
+Please note that our support team cannot modify the content of the transcript. They can assist with any other questions or concerns you may have.
+Thank you for using our transcription service!
+A.P.Strom
+Dear user:
+Your file has been successfully uploaded and is now in our processing queue. This means that our system has received your file, and it is waiting to be processed. We will handle your file as soon as possible.
+ +We will notify you once your file has been processed. If you have any urgent needs or further questions, feel free to reach out to our support team.
+You can contact our support team at {contact_email}. Please note that our support team is here to help with any questions or issues you might have.
+Please note that our support team does not have the ability to change your position in the queue or access the files you have uploaded. They are here to provide assistance and answer any questions you might have about the process.
+Thank you for using our transcription service!
+A.P.Strom
+