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

Automatic listening #19

Open
llcc opened this issue Jul 12, 2014 · 5 comments
Open

Automatic listening #19

llcc opened this issue Jul 12, 2014 · 5 comments
Labels

Comments

@llcc
Copy link

llcc commented Jul 12, 2014

Hi @atykhonov,

Can you see automatic listening will be a good feature for google-translate? In my situation, when i start to read the article, I will call the command to get the listening with mouse or locate the button by keyboard. Surely it will save much time if you can give a option to make it automatically.

Best regards.
llcc

@atykhonov
Copy link
Owner

Hi @llcc !

Thank you for the feature request! I'll implement the function which will allow to listen translation without any needs to translate it to text first. And will try to implement automatic translation as well.

@llcc
Copy link
Author

llcc commented Jul 14, 2014

@atykhonov , that will be a great feature, thanks in advance.

@atykhonov
Copy link
Owner

Hi @llcc !

I'm sorry for such long delay! I extracted function by means of which you can listen translation. This function is google-translate-listen-translation.

You can call it in the following way:

M-: (google-translate-listen-translation "en" "book") RET

You can use that function in many different ways. For example, you can use the following function (M-x listen-article RET):

(defun listen-article ()
  (interactive)
  (google-translate-listen-translation "en"
    (buffer-substring-no-properties (point-min) (point-max))))

That function takes all text from the current buffer (assuming your article is there) and translates it. I'm not sure that such function will suite to your needs but if you need something else just describe your case and I'll help you to create that function.

@atykhonov
Copy link
Owner

Please try that function.

Surely it will save much time if you can give a option to make it automatically.

I believe you can modify acticle-hook on which some function will be called and pass the text to the mentioned function. Please try and let me know. If something will be wrong, sure I'll be ready to help.

@llcc
Copy link
Author

llcc commented Oct 7, 2014

Hi @atykhonov,

This function really fulfills my need, but it seems that it is really not a good way to listen to the whole article one time. I think it is best to listen a paragraph a time.

Thanks you a lot for your help.

llcc

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