Skip to main content

Slice audio + subtitles and export to Anki via AnkiConnect

Project description

🎧 Anki‑Slicer

Anki‑Slicer is a utility that lets you take an audio file (MP3, WAV, etc.) plus two SRT subtitles (original + translation), preview and flag sentences you want to learn, and then export it into an Anki flashcard deck — fully synchronized with the audio.

It’s designed for language learners who want to build rich, sentence‑level listening cards with audio + text, all in just a few clicks. ✨ Features

⏯️ Precise adjustment of audio selection (no more clipped audio or extra sounds).
🕹 Slider & Time Display to seek anywhere in the audio.
🔎 Search subtitles (original, translation, or both) and jump through results.
📤 Export flagged items into Anki via AnkiConnect — creates cards automatically.

📦 Prerequisites

Python 3.9 or later
Anki with the AnkiConnect add‑on installed and running.
An audio file and two SRT files:
    Original transcript (same language as the audio).
    Translation of the original text.

💡 Tip: I personally use McWhisper (paid app) to generate accurate SRTs and export audio from YouTube or audio files. Other workflows are possible — e.g. extracting captions from YouTube, generating with whisper.AI, etc.

🚀 Installation

🚀 Installation

Easy install (from PyPI) – recommended

pip install anki-slicer

### Install directly from GitHub
pip install git+https://github.com/LeeHunter/anki-slicer.git

### Developer install (for contributors)
git clone https://github.com/LeeHunter/anki-slicer.git
cd anki-slicer
pip install -e .




🎮 How to Use Anki‑Slicer

   In a terminal run the following command: python -m anki_slicer

    Ensure Anki (with the AnkiConnect add-on) is running.
    Launch Anki‑Slicer:

    python main.py

    Select your:
        Audio file
        Original SRT
        Translation SRT
    Use the controls:
         Forward and Back buttons
        Mode toggle = Continuous vs. Auto‑Pause playback
        Use the slider to jump around
        🔍 Search subtitles (Original / Translation / Both)
        =/- buttons for precise editing of the selection length
        
    
    Click Create Anki Card  card is created in your AnkiSlicer deck. You can specify the name of the Anki deck. If a deck with that name doesn't exist it will be created. 

🖼 UI Preview

Anki-Slicer Screenshot
🛠 Tip

    Before using Anki-Slicer you might want to edit your translation SRT before loading:
        For example you can use AI to add explanations, grammar notes, transliterations etc. 
        This text appears on the answer side of the Anki card. Note that Anki uses HTML for formatting. 
    

🤝 Contributing

Contributions are welcome!
Ideas, bug reports, feature requests  open an Issue.
Pull requests are encouraged  new features (UI tweaks, extra export formats, etc.) are fair game.

⚖️ License

This project is licensed under the MIT License  see LICENSE for details.

🧪 Status

Currently tested only on macOS. Windows/Linux should work but are not yet validated.
 Feedback and testing reports are welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anki_slicer-0.3.1.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anki_slicer-0.3.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file anki_slicer-0.3.1.tar.gz.

File metadata

  • Download URL: anki_slicer-0.3.1.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for anki_slicer-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b256dce977eff908b797e374f16487565397962fca6e960ad7680e4bb8c6a85e
MD5 502195d68e716e29af18d68fa7e448a1
BLAKE2b-256 359637066d4cd33cd7784964d113f9ee5c1e0ac9b146b0e5362d6f74261244d9

See more details on using hashes here.

File details

Details for the file anki_slicer-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: anki_slicer-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for anki_slicer-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f80152f1c469008a5168ff9949e90c633ebc53d8f9ae38f4edaff503c95b5b24
MD5 f4a2382ea538567626cf7349600b2c18
BLAKE2b-256 1c340f17e2921052aebee310b0d6b8bb6b0ea39a0da97250a3b8f15b24eebe8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page