unna97 / audio-annonation

Django app that allows you to annotate audio.
MIT License
1 stars 1 forks source link

feat: Add upload audio and subtitle functionality #34

Closed unna97 closed 1 month ago

unna97 commented 2 months ago

This commit adds the functionality to upload both audio and subtitle files simultaneously. It includes changes to the urls.py file to add a new URL pattern for uploading audio and subtitle files. Additionally, a new HTML template upload_audio_subtitle.html is created to display the form for uploading the files. The utils.py file is also modified to include a new function process_subtitle_file that processes the uploaded subtitle file and returns a list of subtitle dictionaries.

The commit also includes database migrations to alter the start_time and end_time fields of the Subtitle model to use DurationField instead of TimeField. This change allows for more accurate representation of subtitle timings.

Lastly, the models.py file is updated to include the Subtitle model with the necessary fields and relationships.

Description

Motivation and Context

How Has This Been Tested?

Dependencies Added:

Types of changes

Checklist: