Adding multiple choices results in duplicated audio streams for audio_manual

I am working on an annotation interface that includes an audio_manual and three choices. However, adding more than one choice results in duplicated audio streams. I am wondering if you have any suggestions on how to fix this issue.

Here is an example:

  "blocks": [
      {"view_id": "audio_manual"},
      {"view_id": "html", "html": "<p>This is a fixed html 1</p>"},
      {"view_id": "choice", "options":[{"id": "option_1", "text": "Option 1"}, {"id":"option_2", "text": "Option 2"}],"text": None},
      {"view_id": "html", "html": "<p>This is a fixed html 2</p>"},
      {"view_id": "choice","options":[{"id": "option_3", "text": "Option 3"}, {"id":"option_4", "text": "Option 4"}],"text": None},
      {"view_id": "html", "html": "<p>This is a fixed html 3</p>"},
      {"view_id": "choice", "options":[{"id": "option_4", "text": "Option 4"}, {"id":"option_5", "text": "Option 5"}],"text": None},
  ],

This results in the following interface:

In other words, the bottom two audio streams should not be there. Also, note that I can only select regions and zoom in/out for the top stream. Though, I can play the bottom two streams.

I was able to solve this issue by setting "audio": None in choice task. That is:

"blocks": [
      {"view_id": "audio_manual"},
      {"view_id": "html", "html": "<p>This is a fixed html 1</p>"},
      {"view_id": "choice", "options":[{"id": "option_1", "text": "Option 1"}, {"id":"option_2", "text": "Option 2"}],"text": None, "audio": None},
      {"view_id": "html", "html": "<p>This is a fixed html 2</p>"},
      {"view_id": "choice","options":[{"id": "option_3", "text": "Option 3"}, {"id":"option_4", "text": "Option 4"}],"text": None, "audio": None},
      {"view_id": "html", "html": "<p>This is a fixed html 3</p>"},
      {"view_id": "choice", "options":[{"id": "option_4", "text": "Option 4"}, {"id":"option_5", "text": "Option 5"}],"text": None, "audio": None},
  ],

The documentation does mention that choice task can render other task properties (e.g., text, spans). I guess it was rendering the audio property for each choice task in this case.

1 Like

That's right @tri . By default the choice will render the "content" i.e. text, audio or html. You need to set these keys explicitly to None just like you did. Thanks for sharing your solution!

1 Like