Skip to content

Commit 0418b81

Browse files
Add initial Sphinx documentation structure
1 parent 8398208 commit 0418b81

File tree

6 files changed

+217
-0
lines changed

6 files changed

+217
-0
lines changed

docs/source/api/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
##############
2+
API Reference
3+
##############
4+
5+
This section contains the API documentation generated automatically from the source code docstrings.
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
10+
modules

docs/source/api/modules.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.. _api-reference:
2+
3+
###############
4+
Project Modules
5+
###############
6+
7+
main
8+
====
9+
10+
.. automodule:: main
11+
:members:
12+
13+
stellascript.orchestrator
14+
=========================
15+
16+
.. automodule:: stellascript.orchestrator
17+
:members:
18+
:undoc-members:
19+
:show-inheritance:
20+
21+
stellascript.config
22+
===================
23+
24+
.. automodule:: stellascript.config
25+
:members:
26+
27+
stellascript.cli
28+
================
29+
30+
.. automodule:: stellascript.cli
31+
:members:
32+
33+
stellascript.logging_config
34+
===========================
35+
36+
.. automodule:: stellascript.logging_config
37+
:members:
38+
39+
stellascript.audio.capture
40+
==========================
41+
42+
.. automodule:: stellascript.audio.capture
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
stellascript.audio.enhancement
48+
==============================
49+
50+
.. automodule:: stellascript.audio.enhancement
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
stellascript.processing.transcriber
56+
===================================
57+
58+
.. automodule:: stellascript.processing.transcriber
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
63+
stellascript.processing.diarizer
64+
================================
65+
66+
.. automodule:: stellascript.processing.diarizer
67+
:members:
68+
:undoc-members:
69+
:show-inheritance:
70+
71+
stellascript.processing.speaker_manager
72+
=======================================
73+
74+
.. automodule:: stellascript.processing.speaker_manager
75+
:members:
76+
:undoc-members:
77+
:show-inheritance:

docs/source/conf.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
import os
7+
import sys
8+
sys.path.insert(0, os.path.abspath('../..'))
9+
10+
# -- Project information -----------------------------------------------------
11+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
12+
13+
project = 'StellaScript'
14+
copyright = '2025, Béranger Thomas'
15+
author = 'Béranger Thomas'
16+
release = '1.0.0'
17+
18+
# -- General configuration ---------------------------------------------------
19+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
20+
21+
extensions = [
22+
'sphinx.ext.autodoc',
23+
'sphinx.ext.napoleon',
24+
'sphinx.ext.viewcode',
25+
'sphinx.ext.todo',
26+
]
27+
28+
templates_path = ['_templates']
29+
exclude_patterns = []
30+
31+
language = 'en'
32+
33+
# -- Options for HTML output -------------------------------------------------
34+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
35+
36+
html_theme = 'sphinx_rtd_theme'
37+
html_static_path = ['_static']
38+
39+
# -- Options for todo extension ----------------------------------------------
40+
# https://www.sphinx-doc.org/en/master/usage/extensions/todo.html#configuration
41+
42+
todo_include_todos = True

docs/source/index.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. StellaScript documentation master file.
2+
3+
##########################
4+
StellaScript Documentation
5+
##########################
6+
7+
Introduction
8+
============
9+
10+
StellaScript is a Python application designed for audio transcription and speaker diarization. Its primary goal is to provide an accurate and efficient tool for converting audio streams, whether pre-recorded or captured live, into structured text while identifying the different speakers.
11+
12+
The system is based on a modular architecture and integrates several state-of-the-art machine learning models for its key features:
13+
14+
* **Speech Recognition**: Utilizes OpenAI's Whisper model, through the `whisperx` library for optimized performance, to ensure accurate transcription.
15+
* **Speaker Diarization**: Integrates the `pyannote.audio` pipeline for audio segmentation and turn-taking identification.
16+
* **Speaker Identification**: Generates voice embeddings with `SpeechBrain` to differentiate and track speakers consistently.
17+
18+
This documentation aims to provide a technical overview of the project, its architecture, and its API.
19+
20+
.. toctree::
21+
:maxdepth: 2
22+
:caption: Contents
23+
24+
technical/index
25+
api/index
26+
27+
Indices and tables
28+
==================
29+
30+
* :ref:`genindex`
31+
* :ref:`modindex`
32+
* :ref:`search`
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
###################################
2+
StellaScript Project Architecture
3+
###################################
4+
5+
This document details the structure of the StellaScript project, the role of each file, and how the modules interact to perform audio transcription and diarization.
6+
7+
Overview
8+
========
9+
10+
The project is structured around a main module, ``stellascript``, which contains all the application logic. Execution is initiated by ``main.py`` at the project root, which acts as the entry point.
11+
12+
Root Files
13+
==========
14+
15+
- ``main.py``: **Application entry point.** It is responsible for parsing command-line arguments, initializing the orchestrator, and launching the transcription process (either live or from a file).
16+
- ``README.md``: **Main documentation.** Provides an overview of the project, installation instructions, and usage guidelines.
17+
- ``pyproject.toml`` & ``uv.lock``: **Dependency management.** These files define the Python libraries required for the project to function.
18+
- ``.gitignore``: Configuration file for Git, specifying files and folders to be ignored.
19+
- ``LICENSE``: Contains the MIT license under which the project is distributed.
20+
21+
``stellascript`` Module (Application Core)
22+
============================================
23+
24+
The ``stellascript/`` directory contains the main source code of the application, organized into several modules and sub-modules.
25+
26+
- ``orchestrator.py``: **The conductor.** This is the most important file in the project. The ``StellaScriptTranscription`` class manages the entire processing pipeline. It initializes the various components (transcriber, diarizer, etc.) and coordinates their interactions, whether for real-time or file-based processing.
27+
- ``config.py``: **Central configuration.** This file centralizes all technical constants and parameters used in the application (e.g., sampling rate, audio buffer duration, voice detection thresholds). This allows for easy modification of the application's behavior from a single location.
28+
- ``cli.py``: **Command-line interface.** Defines all the arguments that the user can pass to the program (such as ``--file``, ``--language``, ``--mode``) and ensures they are correctly interpreted.
29+
- ``logging_config.py``: **Logging configuration.** Sets up the logging system to display informational messages, warnings, or errors during execution, which is crucial for debugging.
30+
31+
``stellascript/audio`` Sub-module
32+
------------------------------------
33+
34+
This module is dedicated to handling raw audio data.
35+
36+
- ``capture.py``: **Audio capture.** Manages interaction with the microphone to record the audio stream in real-time.
37+
- ``enhancement.py``: **Audio enhancement.** Contains the logic for applying audio cleaning models, such as ``DeepFilterNet`` or ``Demucs``, to reduce background noise and improve voice clarity before transcription.
38+
39+
``stellascript/processing`` Sub-module
40+
-----------------------------------------
41+
42+
This module contains the components responsible for the intelligent analysis and processing of audio.
43+
44+
- ``transcriber.py``: **Transcription module.** Encapsulates the speech recognition model (Whisper via ``whisperx``). Its sole responsibility is to take an audio segment and convert it into text.
45+
- ``diarizer.py``: **Diarization module.** Its role is to answer the question: "who is speaking and when?". It uses models like ``pyannote.audio`` or a combination of VAD (Voice Activity Detection) and clustering to segment the audio based on speakers.
46+
- ``speaker_manager.py``: **Speaker manager.** Works closely with the ``diarizer``, especially for the ``cluster`` method. It is responsible for creating and managing "voiceprints" (embeddings) to identify and differentiate speakers consistently.

docs/source/technical/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
###################
2+
Technical Section
3+
###################
4+
5+
This section provides detailed information about the internal architecture, design choices, and methodologies used in the StellaScript project.
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
10+
architecture

0 commit comments

Comments
 (0)