Annotation not saved, not present in json content

We are trying to annotate audio files. We are clicking the save icon in the UI, and getting the notification that is it successfully saved, but we are not getting the annotations in the database.

We start prodigy this way:

prodigy audio.manual 0908 /Users/test/Downloads/t3_wav_files/converted --label Appointment,Prescription

After saving the annotations in the UI, we check the database:

select encode(content, 'escape') from "example";

Here is our output:

{"audio":"/Users/test/Downloads/t3_wav_files/converted/1662656450839.wav","text":"1662656450839","meta":{"file":"1662656450839.wav"},"path":"/Users/test/Downloads/t3_wav_files/converted/1662656450839.wav","_input_hash":1981588422,"_task_hash":1490599730,"_is_binary":false,"_view_id":"audio_manual","audio_spans":[],"answer":"accept","_timestamp":1664508931}
{"audio":"/Users/test/Downloads/t3_wav_files/converted/1662656495336.wav","text":"1662656495336","meta":{"file":"1662656495336.wav"},"path":"/Users/test/Downloads/t3_wav_files/converted/1662656495336.wav","_input_hash":-1213870836,"_task_hash":-812945333,"_is_binary":false,"_view_id":"audio_manual","audio_spans":[],"answer":"accept","_timestamp":1664508943}
{"audio":"/Users/test/Downloads/t3_wav_files/converted/1662656541662.wav","text":"1662656541662","meta":{"file":"1662656541662.wav"},"path":"/Users/test/Downloads/t3_wav_files/converted/1662656541662.wav","_input_hash":12330407,"_task_hash":-712677054,"_is_binary":false,"_view_id":"audio_manual","audio_spans":[],"answer":"accept","_timestamp":1664508949}

Not sure what we are missing. We already tried it multiple times.

As a small aside, the markdown rendering on this forum works via ticks (```) not * symbols. I've edited your post to make the code render better.

In general I recommend against interactive with the database directly. It's partially because the tables may change in the future if/when we switch the internal ORM but also because Prodigy gives you API's that make this much easier.

You could use our Python API instead via get_database_examples. Alternatively, you can also use the db-out command.

Could you confirm that the data is still missing if you use these endpoints? If not, could you share a reproducible example so that I may attempt the issue locally?

During the session, we clicked either Appointment(1) or Prescription(2) on top of the UI for each of the audio, then clicked the check mark on the bottom. Then we click the save icon on the top left of the UI.
We used db-out to see the result, but the output is the same.

Annotation means text classification for a specific audio file, right?

Thanks.

I think we got this wrong, thinking that annotation and classification tasks were the same thing. Sorry about this.

Ah! Now I see. In that case I think it's not showing up because you're just clicking on the class without highlighting an area.

I think this custom audio classification recipe from the docs might be just what you need then.

Yes, thank you for this. :slight_smile:

1 Like