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: examples/pipeline_wav2letter/README.md
+3-21Lines changed: 3 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ This is an example pipeline for speech recognition using a greedy or Viterbi CTC
2
2
3
3
### Usage
4
4
5
-
More information about each command line parameters is available with the `--help` option. An example reproducing the demo can be invoked as follows.
5
+
More information about each command line parameters is available with the `--help` option. An example can be invoked as follows.
6
6
```
7
7
python main.py \
8
8
--reduce-lr-valid \
@@ -28,30 +28,12 @@ With these default parameters, we get a character error rate of 13.8% on dev-cle
28
28
### Output
29
29
30
30
The information reported at each iteration and epoch (e.g. loss, character error rate, word error rate) is printed to standard output in the form of one json per line, e.g.
Further information is reported to standard error. Here is an example python function to parse the standard output when saved to a file.
37
-
```python
38
-
defread_json(filename):
39
-
"""
40
-
Convert the standard output saved to filename into a pandas dataframe for analysis.
41
-
"""
42
-
43
-
import pandas
44
-
import json
45
-
46
-
withopen(filename, "r") as f:
47
-
data = f.read()
48
-
49
-
# pandas doesn't read single quotes for json
50
-
data = data.replace("'", '"')
51
-
52
-
data = [json.loads(l) for l in data.splitlines()]
53
-
return pandas.DataFrame(data)
54
-
```
36
+
One way to import the output in python with pandas is by saving the standard output to a file, and then using `pandas.read_json(filename, lines=True)`.
0 commit comments