Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ PDF file, base file names in the case of image files, or `baseFileName-pageNumbe
of multiple PDF files. Without specifying the braces, textra will append a dash followed by
the page number/base file name to the specified path.

## Troubleshooting

- **`ERROR: Speech recognizer does not support on-device recognition`**:

If you get this error, you may need dictation enabled, which you can accomplish in **System Settings** -> **Keyboard** -> **Dictation** -> **Enable dictation**.

Flipping the dictation setting may not immediately fix the error. If `textra` still provides this error or if you cannot toggle the setting, try clicking the "Edit" menu item from the top menu bar when you're in an application (e.g. Terminal) and clicking "Start dictation." This may prompt you to enable "Dictation" again, and a microphone prompt may appear (which you can immediately dismiss by clicking "Done").

Try `textra` again. If it does work, you may safely disable dictation at any time in the system settings. If it does not, please file an issue.

## License

MIT
Expand Down
33 changes: 33 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,25 @@ def assert_has_error(stdout, stderr, file_contents):
],
)

run(
"textra -l en",
[
assert_no_file_contents,
assert_no_stdout,
assert_no_error,
assert_stderr_matches("textra -h"),
],
)

run(
"textra -l en docp1.png -o docp1.txt",
[
assert_files(["docp1.txt"]),
assert_no_stdout,
assert_no_error,
],
)

# Error cases
run(
"textra --invalidoption",
Expand Down Expand Up @@ -335,6 +354,20 @@ def assert_has_error(stdout, stderr, file_contents):
],
)

run(
"textra -l", [assert_no_file_contents, assert_no_stdout, assert_has_error("locale")]
)

run(
"textra docp1.png -l en",
[assert_no_file_contents, assert_no_stdout, assert_has_error("-l")],
)

run(
"textra -l en -l es",
[assert_no_file_contents, assert_no_stdout, assert_has_error("-l")],
)

# TODO: investigate why these fail (but only in Python?)
# run(
# [
Expand Down