Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work with Hebrew #53

Open
kyrsquir opened this issue Dec 9, 2019 · 11 comments
Open

Doesn't seem to work with Hebrew #53

kyrsquir opened this issue Dec 9, 2019 · 11 comments
Labels

Comments

@kyrsquir
Copy link

kyrsquir commented Dec 9, 2019

Try it on any Hebrew word, for example "ברוך"

@xfslove
Copy link
Owner

xfslove commented Dec 10, 2019

please try with trc iw&en. it seems he no working again.

@kyrsquir
Copy link
Author

Won't work for me. While it is configured to iw or he it behaves as if it encounters an error and crashes internally every time a translation is attempted. It won't show any results even when trying to translate an untranslatable special character like ✟ (which works if set to any other language).

@xfslove
Copy link
Owner

xfslove commented Dec 11, 2019

would you please paste the version of the node, alfred, workflow?

and if the workflow shown any errors paste the stack trace too.

@kyrsquir
Copy link
Author

kyrsquir commented Dec 11, 2019

Node 12.13.0
Alfred 4.0.7
Workflow - main 2.0.8 and config 1.0.4

Also noticed that configured language doesn't matter, it crashes on Hebrew words even when other languages are set.

[06:23:54.082] ERROR: Google Translate (no Hebrew)[Script Filter] Code 1: {
	"items": [
		{
			"title": "העדפת",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=iw&tl=en&text=%D7%94%D7%A2%D7%93%D7%A4%D7%AA",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/706b175a-fb56-4246-8834-b1c35c9dbc60.mp3",
			"text": {
				"copy": "העדפת",
				"largetype": "העדפת"
			},
			"icon": {
				"path": "tts.png"
			}
		},
		{
			"title": "Preference",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=en&tl=iw&text=Preference",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/d2ff3cdc-79ed-4133-a562-a1dae8a6a75e.mp3",
			"text": {
				"copy": "Preference",
				"largetype": "Preference"
			},
			"icon": {
				"path": "tts.png"
			}
		}
	]
}
{
	"items": [
		{
			"title": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nHTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n```\n\n-\nGoogle Translate (no Hebrew) 2.0.8\nAlfred 4.0.7\ndarwin 18.7.0",
				"largetype": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}
[06:23:54.087] ERROR: Google Translate (no Hebrew)[Script Filter] JSON error: Garbage at end. in JSON:
{
	"items": [
		{
			"title": "העדפת",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=iw&tl=en&text=%D7%94%D7%A2%D7%93%D7%A4%D7%AA",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/706b175a-fb56-4246-8834-b1c35c9dbc60.mp3",
			"text": {
				"copy": "העדפת",
				"largetype": "העדפת"
			},
			"icon": {
				"path": "tts.png"
			}
		},
		{
			"title": "Preference",
			"subtitle": "Phonetic: ",
			"quicklookurl": "https://translate.google.com/#view=home&op=translate&sl=en&tl=iw&text=Preference",
			"arg": "/var/folders/x7/kgxp3j9j5rx70lpkb0ls4jzr0000gn/T/d2ff3cdc-79ed-4133-a562-a1dae8a6a75e.mp3",
			"text": {
				"copy": "Preference",
				"largetype": "Preference"
			},
			"icon": {
				"path": "tts.png"
			}
		}
	]
}
{
	"items": [
		{
			"title": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nHTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13\n```\n\n-\nGoogle Translate (no Hebrew) 2.0.8\nAlfred 4.0.7\ndarwin 18.7.0",
				"largetype": "HTTPError: Response code 404 (Not Found)\nUrl: https://translate.google.com/translate_tts?client=gtx&tl=iw&ie=UTF-8&idx=0&total=1&textlen=5&q=%D7%94%D7%A2%D7%93%D7%A4%D7%AA&tk=701164.793847\n    at /usr/local/lib/node_modules/alfred-google-translate/node_modules/got/index.js:123:13"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}

@xfslove
Copy link
Owner

xfslove commented Dec 11, 2019

I saw that, its the tts problem. I'll take a look.

you could config the voice:none temporarily.

@xfslove xfslove added the bug label Dec 11, 2019
@kyrsquir
Copy link
Author

kyrsquir commented Dec 11, 2019 via email

@xfslove
Copy link
Owner

xfslove commented Dec 11, 2019

perhaps no. sorry for that. but I'll fix this as soon as possible.

@xfslove
Copy link
Owner

xfslove commented Dec 12, 2019

I found that the Google not support Hebrew voice. look at this:

1

I'll find a way to give tips on workflow.

@xfslove
Copy link
Owner

xfslove commented Aug 25, 2020

Remark: I'm not sure which field of response body represents the voice available or not.

@udiNur
Copy link

udiNur commented Jan 8, 2021

there is any update?

@xfslove
Copy link
Owner

xfslove commented Jan 11, 2021

there is any update?

Sorry, Not yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants