Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Audio #1

Open
cachandlerdev opened this issue Dec 23, 2023 · 2 comments
Open

[Feature Request] Audio #1

cachandlerdev opened this issue Dec 23, 2023 · 2 comments

Comments

@cachandlerdev
Copy link

Hi, thanks for making the project! Since I didn't see it in the readme, I was wondering if the cards have (or will have at some point in the future) audio to help learners practice their pronunciation.

I find it funny that I found your script a few weeks after I tried implementing a very similar idea that would take in epub files and lookup their definitions on Wiktionary based on word frequency. I kept having issues with the Wiktionary API due to inconsistent page formatting though, and the python library I used wasn't properly grabbing the ogg files.

@wjrm500
Copy link
Owner

wjrm500 commented Dec 23, 2023

Hi, no worries and cheers for taking a look!

Audio is an interesting one, I think one that I thought briefly about during development but had forgotten by the time I got round to writing the README.md. My thinking was that there are two options with audio:

  • Generating audio files during the deck creation process and adding them to the notes so that the files actually live inside the output package
  • Having a hyperlink within each note that takes users to some web service that reads the audio out on the fly

The first option doesn't require internet access and allows audio to be played directly from the note, while the second is probably easier to implement, keeps deck creation time in check, and generates more lightweight packages. Both rely on the existence of some third-party, free-to-use, text-to-speech service that can handle foreign languages, which isn't something I've researched at this point. If both options turn out to be viable, it could be that the user can toggle between them by setting a command-line flag, with the second option as the default.

I'm going away over the Christmas period and planning to take a break from this project in the short-term, but I'll definitely add audio to the TODOs list here, and keep you updated on any developments. Thanks!

@wjrm500
Copy link
Owner

wjrm500 commented Jan 11, 2024

Hi @BagelSeasoning234, I've been working on the audio feature over the past couple of days and it seems to be working well. I haven't written tests for it yet so won't merge to master but if you want to use it to build a deck, just checkout the audio branch, re-build the app with pip install -e, then use the new --audio flag to add audio. If you get a chance to test it out, let me know how you find it :)

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

No branches or pull requests

2 participants