diff --git a/apps/task-poster/src/templates.ts b/apps/task-poster/src/templates.ts index 68ea2d89..7c269e49 100644 --- a/apps/task-poster/src/templates.ts +++ b/apps/task-poster/src/templates.ts @@ -73,11 +73,16 @@ const findTemplateFields = (html: string) => { const re = /\$\{([^}]+)\}/g; const matches: string[][] = []; let m; - do { - const m = re.exec(html); - if (m) matches.push(m.slice(0, 3)); - } while (m); - return matches; + while ((m = re.exec(html))) { + matches.push(m.slice(0, 2)); + } + // Deduplicate by field name + const seen = new Set(); + return matches.filter(([_, name]) => { + if (seen.has(name)) return false; + seen.add(name); + return true; + }); }; const form = (msg = "", values: Record = {}): string => ` @@ -117,12 +122,11 @@ ${fields.map( + id="f${name}" name="${name}" type="text">`, +).join("")} -`, -)} `; const templatePreviewFrame = async ( @@ -317,7 +321,7 @@ export const addTemplateRoutes = (app: Express): void => { width="100%" srcdoc="${escapeHTML(renderedTemplate)}"> -${templateDataForm(escapeHTML(html), fields, req.body)}`); +${templateDataForm(html, fields, req.body)}`); }); app.post("/t/:id", requireAuth, async (req, res) => { diff --git a/apps/worker-app/app/pages/index.vue b/apps/worker-app/app/pages/index.vue index fd45c2ae..ffc59b66 100644 --- a/apps/worker-app/app/pages/index.vue +++ b/apps/worker-app/app/pages/index.vue @@ -144,4 +144,4 @@ function prevPage() { #dashboard { background: black !important; } - + \ No newline at end of file diff --git a/assets/templates/Audius/music-transcriber-DEPRECATED.html b/assets/templates/Audius/Depricated/lyric-transcriber.html similarity index 100% rename from assets/templates/Audius/music-transcriber-DEPRECATED.html rename to assets/templates/Audius/Depricated/lyric-transcriber.html diff --git a/assets/templates/Audius/Depricated/song-transcriber.html b/assets/templates/Audius/Depricated/song-transcriber.html new file mode 100644 index 00000000..6cde65a8 --- /dev/null +++ b/assets/templates/Audius/Depricated/song-transcriber.html @@ -0,0 +1,398 @@ + + + + + +
+

Effect AI - Lyric Verification

+

Listen to the full song and verify all transcribed lyrics

+ +
+ +
+
+
+ Loading audio... + +
+
+
+ +
+ + +
+ +

+ Task incomplete - Please resolve all warnings before submitting. +

+ + +
+ + +
diff --git a/assets/templates/Audius/verify-music-transcriber.html b/assets/templates/Audius/Depricated/verify-music-transcriber.html similarity index 100% rename from assets/templates/Audius/verify-music-transcriber.html rename to assets/templates/Audius/Depricated/verify-music-transcriber.html diff --git a/assets/templates/Audius/lyric-transcriber.html b/assets/templates/Audius/lyric-transcriber.html new file mode 100644 index 00000000..bcdc5bb4 --- /dev/null +++ b/assets/templates/Audius/lyric-transcriber.html @@ -0,0 +1,352 @@ +
+

Effect AI - Music Transcriber

+

Listen carefully and correct the lyrics below

+ +
+ +
+
+
+
+ +
+
+ +
+ +
+

Playback Speed:

+ + + + +
+
+ +
+ + + +
+ +
+ + +
+ + +
+ + + +
+ + + + + diff --git a/assets/templates/Audius/song-validation.html b/assets/templates/Audius/song-validation.html new file mode 100644 index 00000000..31cb8b25 --- /dev/null +++ b/assets/templates/Audius/song-validation.html @@ -0,0 +1,949 @@ + + + + + Effect AI - Lyric Verification + + + + + + + +
+
+ +

{{ title }}

+ + +
+ Loading audio… + +
+ + +
+ + +
+
+
+ +
+ +
+ +
+ +
+ + +
+ +
+ Current: {{ formatTime(currentTime) }} +
+
+ +
+
+
Start
+ +
+ +
+
End
+ +
+
+ + +
+ + +
+
+ + +
+ + ⚠️ {{ warning }} + +
+ + +
+ + + + +
+
+
Start
+ +
+ +
+
End
+ +
+ +
+
Current
+ {{ formatTime(currentTime) }} +
+
+ + + +
+ + +
+ + + + +
+
+
Start
+ +
+ +
+
End
+ +
+
+ + +
+
Current
+ {{ formatTime(currentTime) }} +
+
+ + + + +
+ +
+ +
+
+ + +
+

+ ⚠️ Please resolve all overlap warnings before submitting +

+ +
+ +
+ + +
+ +
+
+ + + + \ No newline at end of file diff --git a/assets/templates/Audius/track-tagger.html b/assets/templates/Audius/track-tagger.html index 8afe21d2..7e295a2a 100644 --- a/assets/templates/Audius/track-tagger.html +++ b/assets/templates/Audius/track-tagger.html @@ -1,90 +1,202 @@ -
-

Effect AI - Track Tagger

+ -
+
+

Effect AI - Track Tagger

-
-
- -

+

Task incomplete - Please complete all sections of the task

-
-

Genre:

-
- - - - - - - - - -
- +
+

🎵 Genre

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ +
-
- -
-

Mood:

-
- - - - - - +
+

🎙️ Vocal Presence

+
+
+ + +
+
+ + +
+
+ + +
-
- -
-

Energy Level:

-
- - - +
+

🎤 Lyric Clarity

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
-
- -
-

Danceability:

-
- - - +
+

💭 How it makes you feel

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
-
- -
-

Vocal Presence:

-
- - - +
+

💃 Danceability

+
+
+ + +
+
+ + +
+
+ + +
-
- @@ -111,21 +223,31 @@

Vocal Presence:

notComplete: false, selectedGenre: "", selectedMood: "", - selectedEnergy: "", + selectedClarity: "", selectedDance: "", selectedVocals: "", selectedGenreOther: "", instructions: `
-

*NOTE*

+

Song Tagging Instructions

- Songs may take a few seconds to load. If the song does not load in a reasonable amount of time, please report the task using the report button. + Listen to the track and tag it with appropriate attributes. Your input helps improve music discovery and organization.




-
  • Listen to at least a few seconds of the song before answering the questions.
  • +

    Guidelines:

    +
  • Genre: Select the primary genre of the track. If it doesn't fit standard genres, choose "Other" and specify.
  • +
  • How it makes you feel: Choose the emotion or mood that best describes how the track makes you feel.
  • +
  • Lyric Clarity: Rate how clear and understandable the lyrics are. Choose "Instrumental" if there are no vocals.
  • +
  • Danceability: Assess how suitable the track is for dancing based on rhythm and tempo.
  • +
  • Vocal Presence: Indicate if the track is instrumental or has single/multiple vocalists.
  • +


    +

    Important Notes:

    +
  • Songs may take a few seconds to load. If the song does not load in a reasonable amount of time, please report the task.
  • +
  • Listen to at least 30 seconds of the song before answering the questions.
  • Try to be accurate — guess only if you genuinely can't tell.
  • Use headphones or a quiet environment for the best experience.
  • -
  • If the song abruptly cuts off, is silent, or sounds corrupted, report it.
  • +
  • If the song abruptly cuts off, is silent, or sounds corrupted, please report it.
  • +
  • All fields are required before you can submit.
  • ` }; }, @@ -144,7 +266,7 @@

    *NOTE*

    methods: { async uploadAndSubmit() { this.btnLoading = true; - const fields = [this.selectedGenre, this.selectedMood, this.selectedEnergy, this.selectedDance, this.selectedVocals]; + const fields = [this.selectedGenre, this.selectedMood, this.selectedClarity, this.selectedDance, this.selectedVocals]; if (fields.some(field => field === "")) { this.notComplete = true } @@ -159,11 +281,11 @@

    *NOTE*

    song: this.songSource, genre: this.selectedGenre, mood: this.selectedMood, - energy: this.selectedEnergy, + clarity: this.selectedClarity, dance: this.selectedDance, vocals: this.selectedVocals, } - + }, }, "*", diff --git a/assets/templates/Image Annotation/bounding-box-labeler.html b/assets/templates/Image Annotation/bounding-box-labeler.html new file mode 100644 index 00000000..8cbb4928 --- /dev/null +++ b/assets/templates/Image Annotation/bounding-box-labeler.html @@ -0,0 +1,1050 @@ + + +
    +

    Effect AI - Bounding Box Labeler

    +

    Draw bounding boxes around objects in the image

    + +
    + +
    + + +
    + Drawing label: +
    + +
    + +
    + +

    Select a label, then click and drag to draw. Shift+scroll to zoom. Ctrl+click a box to delete it.

    +

    Select a label, then tap and drag to draw. Pinch to zoom, two fingers to pan.

    + + +
    +
    + Zoom: + + {{ zoomSlider }}% +
    + + +
    + + +
    + +
    + + +
    +
    Loading image...
    + +
    +

    The image could not be loaded. You may skip this task.

    + +
    +
    + + +
    +

    Failed to load image. You may skip this task.

    + +
    + + +
    + +
    + +
    + + +
    +

    Labels Checklist

    +
    + + + + {{ label }} + {{ boxCountFor(label) }} boxes + selected + +
    +
    + +
    + + +
    +

    Drawn Boxes ({{ boxes.length }})

    +
    +
    + + {{ box.label }} +
    + +
    +
    + +
    + No bounding boxes drawn yet. Select a label and draw on the image. +
    + +
    + + +

    + Task incomplete – Every label must have at least one bounding box +

    +

    + Missing: {{ missingLabels.join(', ') }} +

    + + + +
    + + + + + + +
    diff --git a/assets/templates/Mozilla/sentence-creation/verify-sentence-nonpipeline.html b/assets/templates/Mozilla/sentence-creation/verify-sentence-nonpipeline.html new file mode 100644 index 00000000..205e8fac --- /dev/null +++ b/assets/templates/Mozilla/sentence-creation/verify-sentence-nonpipeline.html @@ -0,0 +1,146 @@ + +
    +

    Effect AI - Sentence Verification

    + +
    + +
    + +

    Is a linguistically correct sentence?

    +
    +

    {{sentence}}

    +
    + +
    + + + + + +
    + +

    + Task incomplete - Please complete all sections of the task +

    + + +
    + + + + + + + diff --git a/assets/templates/Mozilla/spontaneous-questions/question-creation.html b/assets/templates/Mozilla/spontaneous-questions/prompt-creation.html similarity index 86% rename from assets/templates/Mozilla/spontaneous-questions/question-creation.html rename to assets/templates/Mozilla/spontaneous-questions/prompt-creation.html index 16242abe..fb20971c 100644 --- a/assets/templates/Mozilla/spontaneous-questions/question-creation.html +++ b/assets/templates/Mozilla/spontaneous-questions/prompt-creation.html @@ -1,32 +1,32 @@
    -

    Effect AI - Question Creator

    +

    Effect AI - Prompt Creator


    - +
    -

    By clicking this button, you accept that the question contributed here will be added to a publicly available cc-0 licensed dataset.

    +

    By clicking this button, you accept that the prompt contributed here will be added to a publicly available cc-0 licensed dataset.

    - Question is too long - Question should be no longer than 15 words + Prompt is too long - Prompt should be no longer than 15 words

    - Question is too short - Question should be longer than 4 words + Prompt is too short - Prompt should be longer than 4 words

    Effect AI - Question Creator createApp({ data() { return { - title: "Effect AI Question Creator", - tmpQuestion: "", + title: "Effect AI Prompt Creator", + tmpPrompt: "", btnLoading: false, notComplete: false, tooShort: false, @@ -87,7 +87,7 @@

    Prompt Guidelines

    What NOT to Include

      -
    • Questions that require long explanations or life stories.
    • +
    • Prompts that require long explanations or life stories.
    • Multiple questions in one prompt.
    • Requests for names, locations, or identifying details.
    • Hypothetical or fictional scenarios.
    • @@ -174,13 +174,13 @@

      4. Example Prompt Themes

      async uploadAndSubmit() { this.btnLoading = true; - const cleanQuestion = this.sanitize(this.tmpQuestion).trim(); - const wordCount = cleanQuestion.split(/\s+/).length; + const cleanPrompt = this.sanitize(this.tmpPrompt).trim(); + const wordCount = cleanPrompt.split(/\s+/).length; this.tooShort = false; this.tooLong = false; - if(this.tmpQuestion == ""){ + if(this.tmpPrompt == ""){ this.notComplete = true } else if (wordCount < 5) { this.tooShort = true; @@ -194,7 +194,7 @@

      4. Example Prompt Themes

      task: "submit", values: { taskTitle: this.title, - question: cleanQuestion, + prompt: cleanPrompt, }, }, "*" diff --git a/assets/templates/Mozilla/spontaneous-questions/record-question.html b/assets/templates/Mozilla/spontaneous-questions/record-prompt-answer.html similarity index 84% rename from assets/templates/Mozilla/spontaneous-questions/record-question.html rename to assets/templates/Mozilla/spontaneous-questions/record-prompt-answer.html index 565e930f..10638cb4 100644 --- a/assets/templates/Mozilla/spontaneous-questions/record-question.html +++ b/assets/templates/Mozilla/spontaneous-questions/record-prompt-answer.html @@ -1,11 +1,11 @@
      -

      Effect AI - Question Answering

      +

      Effect AI - Prompt Answering


      -

      Click Record then answer the question aloud

      +

      Click Record then answer the prompt aloud

      -

      {{ question }}

      +

      {{ prompt }}

      @@ -18,7 +18,7 @@

      Effect AI - Question Answering

      - By clicking this button, you accept that the question contributed here will be added to a publicly available cc-0 licensed dataset. + By clicking this button, you accept that the recording contributed here will be added to a publicly available cc-0 licensed dataset.

      @@ -26,7 +26,7 @@

      Effect AI - Question Answering

      - File size too large. Please stop recording once you've finished answering the question. + File size too large. Please stop recording once you've finished answering the prompt.

      +
      +
    + + +
    + +
    + +
    +
    +
    + +

    + Task incomplete - Please complete all required sections +

    + + +
    +
    + + + + diff --git a/assets/templates/Mozilla/spontaneous-questions/verify-question.html b/assets/templates/Mozilla/spontaneous-questions/verify-prompt.html similarity index 68% rename from assets/templates/Mozilla/spontaneous-questions/verify-question.html rename to assets/templates/Mozilla/spontaneous-questions/verify-prompt.html index faa2685a..20d508dd 100644 --- a/assets/templates/Mozilla/spontaneous-questions/verify-question.html +++ b/assets/templates/Mozilla/spontaneous-questions/verify-prompt.html @@ -1,14 +1,14 @@
    -

    Effect AI - Question Verification

    +

    Effect AI - Prompt Verification


    -

    Is this a valid question?

    +

    Is this a valid prompt?

    -

    {{question}}

    +

    {{prompt}}

    @@ -51,69 +51,69 @@

    Effect AI - Question Verification

    createApp({ data() { return { - title: "Effect AI Question Verifier", + title: "Effect AI Prompt Verifier", btnLoading: false, author: "${submissionByPeer}", // incoming result - {"timestamp": "", "submissionByPeer": "", "taskId": "", "result": "JSON_STRING"} - question: (JSON.parse("${result}")).values.question, + prompt: (JSON.parse("${result}")).values.prompt, isValidated: "", loading: true, notComplete: false, instructions: `
    -

    Verify a Question - Common Voice

    +

    Verify a Prompt

    - In this task, you will review short, simple questions written by other contributors. - Your goal is to decide whether each question is clear, natural, and suitable for collecting short spoken responses. + In this task, you will review short, simple prompts written by other contributors. + Your goal is to decide whether each prompt is clear, natural, and suitable for collecting short spoken responses.

    1. Instructions

    - Carefully read each question and decide whether it follows the guidelines below. - Mark “Yes” if the question is acceptable, “No” if it is not. - If you are unsure, you may Skip the question. + Carefully read each prompt and decide whether it follows the guidelines below. + Mark “Yes” if the prompt is acceptable, “No” if it is not. + If you are unsure, you may Skip the prompt.

    -

    Question Verification Guidelines

    +

    Prompt Verification Guidelines

      -
    • The question should be clear and easy to understand.
    • +
    • The prompt should be clear and easy to understand.
    • It should be possible to answer naturally in a short spoken response.
    • -
    • The question must use correct grammar, spelling, and punctuation.
    • +
    • The prompt must use correct grammar, spelling, and punctuation.
    • It should sound natural and conversational.
    • Casual English is fine, but phrasing should not be confusing.

    Mark as INCORRECT if you see:

      -
    • Grammar or spelling mistakes that make the question unclear.
    • +
    • Grammar or spelling mistakes that make the prompt unclear.
    • Foreign words or non English text.
    • Overly complex, abstract, or technical language.
    • Personal or identifying information requests.
    • -
    • Questions that feel unnatural, incomplete, or hard to answer.
    • -
    • Statements or sentences that are not actually questions.
    • +
    • Prompts that feel unnatural, incomplete, or hard to answer.
    • +
    • Statements or sentences that are not actually prompts.

    2. Examples

    -

    ✅ Correct Questions

    +

    ✅ Correct Prompts

      -
    • What is a small moment today that made you smile?
    • +
    • Tell a small moment today that made you smile.
    • How did you feel when you woke up this morning?
    • Can you describe a short conversation you had today?
    -

    ❌ Incorrect Questions

    +

    ❌ Incorrect Prompts

    • Tell me everything about your childhood. (too broad)
    • -
    • THIS question has RANDOM capitalization!!! (unnatural formatting)
    • -
    • The town has many people living there. (not a question)
    • +
    • THIS prompt has RANDOM capitalization!!! (unnatural formatting)
    • +
    • The town has many people living there. (this is a statement)
    • Je vais au parc ce matin. (foreign language)
    • Why is existence meaningful in modern society? (too abstract)

    3. Tips for Success

      -
    • Read the question out loud and see if it sounds natural.
    • -
    • If the question feels awkward or confusing, mark it as incorrect.
    • +
    • Read the prompt out loud and see if it sounds natural.
    • +
    • If the prompt feels awkward or confusing, mark it as incorrect.
    • If answering it would take a long time, it is probably not suitable.
    • Trust your instincts and do not overthink small details.
    @@ -146,7 +146,7 @@

    3. Tips for Success

    values: { taskTitle: this.title, author: this.author, - question: this.question, + prompt: this.prompt, isValidated: this.isValidated }, }, diff --git a/assets/templates/Mozilla/spontaneous-questions/verify-question-recording.html b/assets/templates/Mozilla/spontaneous-questions/verify-question-recording.html deleted file mode 100644 index 291e950f..00000000 --- a/assets/templates/Mozilla/spontaneous-questions/verify-question-recording.html +++ /dev/null @@ -1,254 +0,0 @@ -
    -

    Effect AI - Question Recording Verification

    - -
    - -
    -
    -

    {{ question }}

    -
    - -
    - -
    - -
    - -
    -

    Recording Metadata

    - -
    - -
    - -
    -
    -
    - -

    - Task incomplete - Please complete all sections of the task -

    - - -
    -
    - - - -