Skip to content

Commit

Permalink
return transcription
Browse files Browse the repository at this point in the history
  • Loading branch information
knoriy committed Dec 8, 2023
1 parent d758db8 commit 47200a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_dataset_collection_tool/audio_recorder/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def get(self, request, *args, **kwargs):
elif download_param == 'parquet':
return self.create_parquet_response(utterances)
else:
response_data = [{'id': utt['pk'], 'url': utt['audio_recording']} for utt in utterances]
response_data = [{'id': utt['pk'], 'url': utt['audio_recording'], 'transcription': utt['utterance']} for utt in utterances]
return RestResponse(response_data)

def get_parameters(self, request):
Expand All @@ -659,7 +659,7 @@ def get_parameters(self, request):
return status_param, limit_param, download_param

def query_utterances(self, status, limit):
query = Utterances.objects.filter(status=status).values('pk', 'audio_recording')
query = Utterances.objects.filter(status=status).values('pk', 'audio_recording', 'utterance')
return query[:limit] if limit else query

def report_utterance(request, utterance_id):
Expand Down

0 comments on commit 47200a3

Please sign in to comment.