No project description provided
Project description
Wagtail Transcription
wagtail-transcription is app for Wagtail that allows to create transcriptions for YouTube videos automaticlly with just few clicks! To create transcription it use AssemblyAi API.
pip install wagtail-transcription
Then add wagtail_transcription
and notifications
to your installed apps:
Note: Make sure that 'wagtail_transcription' is added before 'wagtail.admin'. Otherwise, administration page will not work properly
INSTALLED_APPS = [
...
'wagtail_transcription',
'notifications',
...
]
SetUp
After installing wagtail-transcription and adding it to installed apps run migrations:
python manage.py migrate
Then add following to your project urls.py
from wagtail_transcription import urls as wagtail_transcription_url
import notifications.urls
urlpatterns = [
...
path("wagtail_transcription/", include(wagtail_transcription_url)),
re_path(r'^inbox/notifications/', include(notifications.urls, namespace='notifications')),
...
]
In your settigns file add 'ASSEMBLY_API_TOKEN' (to get it create Assembly Ai account)
ASSEMBLY_API_TOKEN = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Optional In your settings file add 'DOCUMENTS_GROUP = True' to create menu group from wagtail documents and transcription
DOCUMENTS_GROUP = True
Usage
In model that you want to add dynamically generated transcryption
from wagtail_transcription.edit_handlers import VideoTranscriptionPanel
from wagtail_transcription.models import Transcription
class YourModel(Orderable, models.Model):
video_id = video_id = models.CharField(max_length=255, blank=True)
transcription = models.ForeignKey(
Transcription,
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name='+'
)
panels = [
MultiFieldPanel([
VideoTranscriptionPanel('video_id', transcription_field='transcription'),
FieldPanel('transcription'),
], heading="Video and Transcription"),
]
video_id field accept only youtube video id (not urls). VideoTranscriptionPanel takes two arguments:
- field_name - name of field for video_id
- transcription_field - name of transcription field
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for wagtail-transcription-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d6260fb6b575a2a4914d6563f6d45edee671cffc97adc871c63830782cd2a0 |
|
MD5 | 92e86a554ed24444716c60ddc18a02bf |
|
BLAKE2b-256 | fdd726350e7208fea7da75cb33de466f540ed0aea609f51e2d168a725d6b91ab |
Hashes for wagtail_transcription-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81fb20be8b0a5f0ebce01baf4e41e8bebf2b802df8b7baf8682cb81410d657d2 |
|
MD5 | bd5799d7e9668d909da0b12e3eb81742 |
|
BLAKE2b-256 | 09a7d8ad70bc21e543e4faf0a076885bed24957f29f2de9b3e8163ea73498678 |