Skip to content

Alto 5564 - #12

Merged
dsgou merged 7 commits into
mainfrom
ALTO-5564
Sep 23, 2026
Merged

dsgou merged 7 commits into
mainfrom
ALTO-5564

Conversation

@dsgou

@dsgou dsgou commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Rewrites the README and adds a small helper, print_results(), that prints result rows. Bumps the version to 0.7.1.

README

  • New structure: Features, Quickstart, Deepfake Detection (audio, generator detection, video), Streaming, Available Methods, Timeouts and Error Handling, MCP, Requirements, Docs.
  • Every claim checked against the code and the readme.io docs; all doc links return 200.
  • Examples print readable rows (st et task label (confidence)) instead of raw model dumps.
  • Adds embeddings, generator detection, video results, request timeouts and streaming (grpc.RpcError) error handling.

SDK

  • behavioralsignals.utils.print_results(items): one line per result — start, end, task, top label and its probability. Continuous tasks (e.g. intensity) show their score; rows with no label (the embeddings row) are skipped. Same label logic as the MCP server's result table.
  • utils now imports pydub only inside make_audio_stream(). Before, importing utils printed pydub's "Couldn't find ffmpeg" warning, even for WAV files.
  • Labels are stripped, since ASR text comes from the API with a leading space.
  • examples/streaming/streaming_api_file.py prints rows with print_results().

Testing

  • New unit tests for print_results() and for the lazy pydub import.
  • ruff, ruff format, mypy: clean. 100 tests pass, 93% coverage.
  • Run against the live API with a 30 s WAV clip:
    • Quickstart behavioral batch ✅
    • Deepfake batch ✅
    • README behavioral streaming snippet ✅
    • streaming_api_file.py --api deepfakes ✅
    • Error-handling example (404 for an unknown pid) ✅
  • Not run live: embeddings, generator detection, video, S3 upload, MCP setup.

dimitris_sgou and others added 7 commits September 23, 2026 13:18
…ral embeddings example

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pydub warns on import when ffmpeg is missing, so importing utils for
print_results() printed that warning even for WAV files. ASR labels
come with a leading space from the API.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/behavioralsignals
  utils.py
Project Total  

This report was generated by python-coverage-comment-action

@dsgou
dsgou requested a review from lefteris12 September 23, 2026 12:12
@dsgou
dsgou merged commit c41328e into main Sep 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants