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

Enforce selection of media file language #71

Merged
merged 9 commits into from
Mar 21, 2024

Conversation

zekehuntergreen
Copy link
Contributor

@zekehuntergreen zekehuntergreen commented Mar 20, 2024

What does this change?

  • changes transcription form so that there is no default language chosen, and the user must either select a language or 'Auto-detect language'.
  • fixes the form on mobile by changing the language picker from a flowbite-react Dropdown element to a react Select element. The former didn't work on some mobile devices. When it was selected, the dropdown opened upward (regardless of placement property) and couldn't be navigated by swiping or scrolling.
  • improves handling of form state by moving from a query selector to get files on form submission, to keeping track of that state with a useState hook

Before

auto-detect language is the default, language picker doesn't work

language.picker.bug.mov

after

no default language, language picker does work

language.picker.fixed.mov

How to test

  • tested in CODE

How can we measure success?

  • fewer mistakenly detected transcriptions
  • users can use language picker on mobile

zekehuntergreen and others added 3 commits March 20, 2024 16:20
Co-Authored-By: Marjan Kalanaki <15894063+marjisound@users.noreply.github.com>
Co-Authored-By: Marjan Kalanaki <15894063+marjisound@users.noreply.github.com>
zekehuntergreen and others added 3 commits March 21, 2024 11:08
Co-Authored-By: Marjan Kalanaki <15894063+marjisound@users.noreply.github.com>
Co-Authored-By: Sam Cutler <5560113+itsibitzi@users.noreply.github.com>
Co-Authored-By: Luke Hoyland <luke.hoyland@theguardian.com>
@zekehuntergreen zekehuntergreen marked this pull request as ready for review March 21, 2024 11:44
@zekehuntergreen zekehuntergreen requested a review from a team March 21, 2024 11:46
this isn't true - when we pass language 'auto', the model detects the language that most of the audio is in, then only transcribes audio in that language, ignoring the rest
// being submitted without any files selected. Need to confirm this in
// order to narrow the type of files
if (files === null || files.length === 0) {
console.error('form submitted without any files');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we don't have anything shipping client side logs anywhere, I'm not sure it's worth logging here

Copy link
Contributor

@philmcmahon philmcmahon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a well thought out improvement, makes sense!

Copy link
Contributor

@itsibitzi itsibitzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Co-Authored-By: Sam Cutler <5560113+itsibitzi@users.noreply.github.com>
Co-Authored-By: Luke Hoyland <luke.hoyland@theguardian.com>
@zekehuntergreen zekehuntergreen merged commit 71f9175 into main Mar 21, 2024
1 check passed
@zekehuntergreen zekehuntergreen deleted the user-must-choose-language branch March 21, 2024 18:00
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

Successfully merging this pull request may close these issues.

4 participants