audia — top-level package

audia – Turn documents into audio, intelligently.

Core pipeline: PDF → text extraction → agentic cleaning → TTS → audio file. Optional: ArXiv research → select paper → pipeline above.

class audia.Settings(_case_sensitive=None, _nested_model_default_partial_update=None, _env_prefix=None, _env_prefix_target=None, _env_file=PosixPath('.'), _env_file_encoding=None, _env_ignore_empty=None, _env_nested_delimiter=None, _env_nested_max_split=None, _env_parse_none_str=None, _env_parse_enums=None, _cli_prog_name=None, _cli_parse_args=None, _cli_settings_source=None, _cli_parse_none_str=None, _cli_hide_none_type=None, _cli_avoid_json=None, _cli_enforce_required=None, _cli_use_class_docs_for_groups=None, _cli_exit_on_error=None, _cli_prefix=None, _cli_flag_prefix_char=None, _cli_implicit_flags=None, _cli_ignore_unknown_args=None, _cli_kebab_case=None, _cli_shortcuts=None, _secrets_dir=None, _build_sources=None, *, server_host='127.0.0.1', server_port=8000, reload=False, data_dir=<factory>, llm_provider='openai', openai_api_key=None, openai_api_base=None, anthropic_api_key=None, anthropic_api_base=None, google_api_key=None, google_api_base=None, llm_model='gpt-4o-mini', llm_temperature=0.1, llm_max_chunk_chars=8000, tts_backend='edge-tts', tts_voice='en-US-AriaNeural', tts_rate='+0%', tts_chunk_chars=3800, stt_model='base', stt_device='cpu', stt_record_seconds=30, arxiv_max_results=10)[source]

Bases: BaseSettings

Parameters:
  • _case_sensitive (bool | None)

  • _nested_model_default_partial_update (bool | None)

  • _env_prefix (str | None)

  • _env_prefix_target (EnvPrefixTarget | None)

  • _env_file (DotenvType | None)

  • _env_file_encoding (str | None)

  • _env_ignore_empty (bool | None)

  • _env_nested_delimiter (str | None)

  • _env_nested_max_split (int | None)

  • _env_parse_none_str (str | None)

  • _env_parse_enums (bool | None)

  • _cli_prog_name (str | None)

  • _cli_parse_args (bool | list[str] | tuple[str, ...] | None)

  • _cli_settings_source (CliSettingsSource[Any] | None)

  • _cli_parse_none_str (str | None)

  • _cli_hide_none_type (bool | None)

  • _cli_avoid_json (bool | None)

  • _cli_enforce_required (bool | None)

  • _cli_use_class_docs_for_groups (bool | None)

  • _cli_exit_on_error (bool | None)

  • _cli_prefix (str | None)

  • _cli_flag_prefix_char (str | None)

  • _cli_implicit_flags (bool | Literal['dual', 'toggle'] | None)

  • _cli_ignore_unknown_args (bool | None)

  • _cli_kebab_case (bool | Literal['all', 'no_enums'] | None)

  • _cli_shortcuts (Mapping[str, str | list[str]] | None)

  • _secrets_dir (PathType | None)

  • _build_sources (tuple[tuple[PydanticBaseSettingsSource, ...], dict[str, Any]] | None)

  • server_host (str)

  • server_port (int)

  • reload (bool)

  • data_dir (Path)

  • llm_provider (Literal['openai', 'anthropic', 'google'])

  • openai_api_key (str | None)

  • openai_api_base (str | None)

  • anthropic_api_key (str | None)

  • anthropic_api_base (str | None)

  • google_api_key (str | None)

  • google_api_base (str | None)

  • llm_model (str)

  • llm_temperature (float)

  • llm_max_chunk_chars (int)

  • tts_backend (Literal['edge-tts', 'kokoro', 'openai'])

  • tts_voice (str)

  • tts_rate (str)

  • tts_chunk_chars (int)

  • stt_model (str)

  • stt_device (str)

  • stt_record_seconds (int)

  • arxiv_max_results (int)

model_config = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_kebab_case': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_shortcuts': None, 'cli_use_class_docs_for_groups': False, 'enable_decoding': True, 'env_file': '.env', 'env_file_encoding': 'utf-8', 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_nested_max_split': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': 'AUDIA_', 'env_prefix_target': 'variable', 'extra': 'ignore', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_validate', 'model_dump', 'settings_customise_sources'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_config_section': None, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

server_host: str
server_port: int
reload: bool
data_dir: Path
get_project_dirs(project=None)[source]

Return filesystem paths for project (defaults to ‘default’).

Parameters:

project (str | None)

Return type:

ProjectDirs

property db_path: Path
property audio_dir: Path
property upload_dir: Path
property debug_dir: Path
ensure_dirs()[source]

Create all required directories if they don’t exist.

Return type:

None

llm_provider: Literal['openai', 'anthropic', 'google']
openai_api_key: str | None
openai_api_base: str | None
anthropic_api_key: str | None
anthropic_api_base: str | None
google_api_key: str | None
google_api_base: str | None
llm_model: str
llm_temperature: float
llm_max_chunk_chars: int
tts_backend: Literal['edge-tts', 'kokoro', 'openai']
tts_voice: str
tts_rate: str
tts_chunk_chars: int
stt_model: str
stt_device: str
stt_record_seconds: int
arxiv_max_results: int
audia.get_settings()[source]

Return a cached Settings instance (reads .env on first call).

Return type:

Settings