You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/upload-data.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,29 +2,40 @@
2
2
3
3
The tool provides an end point to upload datapoints. You would need an API Key which can be found on the admin dashboard for all projects. To upload datapoints for a project, you would need to make a `POST` request to `/api/data` end point. API Key should be passed in `Authorization` header. Labels for data can also be uploaded.
4
4
5
-
For every datapoint, we need to provide the following required information:
5
+
Following are ways in which datapoints can be created and their respective requirements:
6
6
7
-
1.`audio_file`: The audio binary file of `mp3`, `wav` or `ogg` format along with filename.
8
-
2.`username`: The username to whom this audio needs to be assigned for annotation. It should be one of the users created.
7
+
1. Using remote audio file url
8
+
1.`data_url`: The URL to audio file accessable via a simple python request.
9
+
2. Using local audio files
10
+
1.`audio_file`: The audio binary file of `mp3`, `wav` or `ogg` format along with filename.
11
+
2.`username`: The username to whom this audio needs to be assigned for annotation. It should be one of the users created.
9
12
10
13
You can also provide the following optional information:
11
14
12
15
1.`reference_transcription`: Transcription of audio for reference.
13
-
2.`is_marked_for_review`: Whether this audio should be marked for review or not.
16
+
2.`is_marked_for_review`: Whether this audio should be marked for review or not.
14
17
3.`segmentations` : The list of segmentation values for the given audio.
15
18
16
19
We provide an [example CLI script](../../examples/upload_data/upload_data.py) to show how to upload the datapoints.
17
20
18
21
For example, you can add data with reference transcripts:
19
22
20
23
```sh
24
+
// creating datapoint using local audio file
21
25
API_KEY=4369e45d3a94466b8fe1efb86b8a4392 python upload_data.py --username admin --is_marked_for_review True --audio_file OSR_us_000_0010_8k.wav --host localhost --port 80 --reference_transcription "The birch canoe slid on the smooth planks. Glue the sheet to the dark blue background. It's easy to tell the depth of a well. These days a chicken leg is a rare dish. Rice is often served in round bowls. The juice of lemons makes fine punch. The box was thrown beside the parked truck. The hogs were fed chopped corn and garbage. Four hours of steady work faced us. Large size in stockings is hard to sell."
22
26
```
23
27
24
28
or
25
29
30
+
```sh
31
+
// creating datapoint using remote audio file url
32
+
API_KEY=67cf63744f0f444f98a4326f37b53b93 python3 upload_data.py --username admin --is_marked_for_review True --host localhost --port 3000 --reference_transcription "Glue the sheet to the dark blue background." --data_url "https://static.wikia.nocookie.net/soundeffects/images/3/31/Bird_Singing_Chirp_Sound.ogg/revision/latest?cb=20210122103806"
0 commit comments