Skip to content

Commit 296de44

Browse files
Merge pull request #5 from rainiera/master
Add 'phrases' to ALLOWED_FIELDS for audio transcription task, fix tests
2 parents c768c8a + 03b11b6 commit 296de44

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

scaleapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'lineannotation': {'attachment', 'attachment_type', 'instruction',
2121
'objects_to_annotate', 'with_labels', 'examples'},
2222
'datacollection': {'attachment', 'attachment_type', 'fields'},
23-
'audiotranscription': {'attachment', 'attachment_type', 'verbatim'}}
23+
'audiotranscription': {'attachment', 'attachment_type', 'verbatim', 'phrases'}}
2424
SCALE_ENDPOINT = 'https://api.scaleapi.com/v1/'
2525
DEFAULT_LIMIT = 100
2626
DEFAULT_OFFSET = 0

tests/test_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_transcription_fail():
6262
attachment_type='website')
6363

6464

65+
@pytest.mark.skip(reason="Deprecated at the moment")
6566
def test_phonecall_ok():
6667
task = client.create_phonecall_task(
6768
callback_url='http://www.example.com/callback',
@@ -73,6 +74,7 @@ def test_phonecall_ok():
7374
choices=['He is happy', 'He is not happy'])
7475

7576

77+
@pytest.mark.skip(reason="Deprecated at the moment")
7678
def test_phonecall_fail():
7779
with pytest.raises(scaleapi.ScaleInvalidRequest):
7880
client.create_phonecall_task(
@@ -186,7 +188,8 @@ def test_audiotranscription_ok():
186188
callback_url='http://www.example.com/callback',
187189
attachment_type='audio',
188190
attachment='https://storage.googleapis.com/deepmind-media/pixie/knowing-what-to-say/second-list/speaker-3.wav',
189-
verbatim=False
191+
verbatim=False,
192+
phrases=['avocado', 'stone']
190193
)
191194

192195

0 commit comments

Comments
 (0)