Bỏ qua đến nội dung

Edit audios in the external editor

Chờ xử lý #anki #addon #edit #audios #the #external #editor
https://github.com/TruongQToan
24/6/2020

Cách tải addon Edit audios in the external editor

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

1502086928

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 1502086928 và copy

14
4

Mô tả chi tiết

Open the first audio in front and back card in Audacity by pressing g. Config the add on by pressing shift+g. Issue


Liên kết hỗ trợ


Reviews (16)

👍 2025-06-10

With a few tweaks I have found this addon to be a valuable tool for speeding up edits to audio files in my cards, also opens the files in audacity much faster that importing them through Audacity directly.

For me I found that I needed to make 2 tweaks to iron out the usage, both in the init.py file in the addon folder:

  1. I could not change the default location where the addon looks for the audacity executable (i.e. audacity.exe) using the menu in Anki, I assume a mismatch between PyQt5 and

👍 2025-05-24

Great! Some bug fixes from me. Anki Version ⁨25.02.4 https://gist.github.com/SlidEnergy/17fc3743f0852871d7a6e03235fe7e01

👍 2025-01-26

I managed to fix this addon using Chatgpt, for those who want to use this you need to copy this code into your init.py file

https://gist.github.com/brothamanben/0f05e98194326f78f0b7515ac479a237

👍 2024-02-19

I’m so tired of searching for audio files in a 6000+ file media library to correct audio with too much audio volume drop. This addon is just what I need. btw plz update t o23.12.1

👍 2024-01-24

It opens the audio quickly in Audacity but I’m not sure how to save the changes back to Anki. In Audacity you normally have to do an Export to save an mp3 file and then it will ask you where you want to save it. I’m not sure if the idea of this Addon is that you export to somewhere (eg. your deskop) and then manually drag that file back into Anki, or if there’s meant to be a way of editing the audio file in Audacity and saving it directly back to Anki.

👍 2020-08-27

VẤN ĐỀ : Nếu bạn không bấm nút G được thì bạn có thể vào adds on , sau đó vào thư mục bằng cách chọn vào edit audio in external editor —> view files

—> chọn file init.py —> mở nó bằng Notepad —> Ctrl + f tìm dòng” action.setShortcut(QKeySequence(‘g’)) ” —> chuyển nó thành

” action.setShortcut(QKeySequence(‘ctrl+g’)) ” và lưu file đó lại , khởi động lại Anki , sau đó sử dụng phím ctrl+g là dùng như bình thường , hihi . Khuyến nhé =))

👍 2020-08-06

Nút G trên máy tính em bấm nó sao không được. Em toàn phải vào Tools để Edit audio không ạ T^T

👍 2020-07-15

There isn’t just Windows or (everything else I don’t understand and I don’t care if Python is multiplatform I’m gonna delete the stuff that made that plugin multi-platform because it works for me and that’s enough to publish the plugin)

I do appreciate the work done on this plugin, but while it was working last year on Linux it hasn’t for a while.

I’ve kind of fixed it for myself, if people stop complaining maybe this basic patch can be added to the code. Guys, let us know in the comments.

👍 2020-06-02

Debug info:

Anki 2.1.15 (442df9d6) Python 3.8.3rc1 Qt 5.12.5 PyQt 5.14.2

Platform: Linux

Flags: frz=False ao=True sv=2

Add-ons possibly involved: Edit audios in the external editor

Caught exception:

File “/home/josh/.local/share/Anki2/addons21/1502086928/init.py”, line 416, in handleOpenAudios

openAudios(editorPath, audiosToOpen)

File “/home/josh/.local/share/Anki2/addons21/1502086928/init.py”, line 386, in openAudios

code = subprocess.call(params)

File “/usr/li

👍 2020-03-13

Please upgrade!!!

Debug info:

Anki 2.1.8 (71e0c880) Python 3.7.5 Qt 5.12.4 PyQt 5.12.3

Platform: Linux

Flags: frz=False ao=True sv=1

Caught exception:

File “/home/user/.local/share/Anki2/addons21/1502086928/init.py”, line 416, in handleOpenAudios

openAudios(editorPath, audiosToOpen)

File “/home/user/.local/share/Anki2/addons21/1502086928/init.py”, line 386, in openAudios

code = subprocess.call(params)

File “/usr/lib/python3.7/subprocess.py”, line 339, in call

👍 2020-02-06

I don’t opened when press G, an error occurred:

Anki 2.1.19 (3c8690ae) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2

Platform: Windows 10

Flags: frz=True ao=True sv=2

Caught exception:

Traceback (most recent call last):

File “C:\Users\dinh phu\AppData\Roaming\Anki2\addons21\1502086928_init_.py”, line 407, in handleOpenAudios

if card is None:

File “C:\Users\dinh phu\AppData\Roaming\Anki2\addons21\1502086928_init_.py”, line 386, in openAudios

utils.showInfo(“Cannot open %s. Choos

👍 2020-02-03

it was problem when i use the Audacity

Caught exception:

Traceback (most recent call last):

File “C:\Users\DUC\AppData\Roaming\Anki2\addons21\1502086928_init_.py”, line 170, in handleOpenAudios

editorPath = findEditorPath()

File “C:\Users\DUC\AppData\Roaming\Anki2\addons21\1502086928_init_.py”, line 59, in findEditorPath

editorPath = dialog.config[“editor_path”]

AttributeError: ‘NoneType’ object has no attribute ‘config’

👍 2020-01-09

2020-01-08 Update: The following no longer works.




If you're on macOS Mojave and want to use it with Adobe Audition, then replace line 67 by the following line:



subprocess.call(["open", "-a", "/Applications/Adobe Audition 2020/Adobe Audition 2020.app", full_path])



In other words, do not double-escape spaces as is necessary for Windows.



The shortcut can be changed at line 70.

### 👍 2020-01-05

thank for updating, it's so helpful

### 👍 2019-11-06

If I have a deck include 3 separate audios: word, define, example. It will only send the first audio ( the word) to audacity. How can I send define or example to audacity?

### 👍 2019-10-10

Do you have a github, or anywhere to put a bug report ?

There are at least two problems. First, the shortcut is added even when I'm not reviewing. So pressing g generate the error message:



anki

Caught exception:

  File "/home/arthur/.local/share/Anki2/addons21/1502086928/__init__.py", line 46, in edit_audios

    for field, value in card.note().items():

<class 'AttributeError'>: 'NoneType' object has no attribute 'note'



Secondly, when I'm reviewing and press g, I get the message



Cau