agermanidis / autosub

[NO LONGER MAINTAINED] Command-line utility for auto-generating subtitles for any video file
MIT License
4.15k stars 1.65k forks source link

api key Is it a charge item? #111

Open Ericxiaoshuang opened 6 years ago

Ericxiaoshuang commented 6 years ago

Thank you very much for sharing and paying However, it seems that google's translation api is chargeable? Your key is in the source code Will our use cause consumption? A little worried~ hope to get your reply

realyangxuesen commented 5 years ago

Yes. https://cloud.google.com/speech-to-text/

BingLingGroup commented 5 years ago

Yes. https://cloud.google.com/speech-to-text/

To be more specific, the api used in the source code is not the chargeable ones from cloud speech api, and the google cloud speech-to-text api is different from the google translation api. If you find the first issue your api key #1, you will know it's hard-coded on chromium. If you open the history of constants.py where the api constant is used in the code, you will find out the api hasn't changed since the repo was created. Reference: #50


写完了才发现大家好像都是国人,丢人.jpg,那就顺便翻译一下。

确切来讲,源码里面这个api是免费的,和谷歌云语音转文字的api不一样,而谷歌云语音转文字的api和谷歌翻译api也不是同一个。你看了1号issue #1 就知道源码里的这个api是来自chromium代码里的。你打开constants.py的历史就知道源码里的这个api key自从项目创建起就没变过。

相关问题参考:#50

BingLingGroup commented 5 years ago

What you are asking is two questions.

  1. Is google's translation api chargeable?
  2. Does the speech-to-text api key in the source code have any cost?

And you made a little mistake.

First of all, the google cloud speech-to-text api is different from the google translation api. If you want to register a new account on google website and use them, they are not free to use and chargeable of course. But you can find some translation api keys shared by other people. (Like a forked version of autosub. But I don't guarantee they are usable)

Second, the speech-to-text api key in the source code is not the ones from chargeable api on google cloud speech. It's from chromium. See the reply above. So it is free to use and the developer won't pay for it. But I need to point out that the autosub don't have the function for you to input your customized google cloud speech-to-text api. You need to edit the source code in order to make it available. And not just change the api variable itself. Because the cloud speech api has a different usage, you need to rewrite the code.


写完了才发现大家好像都是国人,丢人.jpg,那就顺便翻译一下。

首先你问了两个问题

  1. 谷歌翻译api是不是付费的
  2. 源码中的语音转文字api花不花钱

还有一点你搞错了

首先,谷歌云语音转文字谷歌翻译 是两个api。如果你想去自己注册账号用官方的版本,那当然是付费的。但是你能找到一些autosub的fork版本自带了可以使用的翻译api,譬如这个autosub,但是我没试过能不能用。

其次,源码中的谷歌云语音转文字api是免费的,作者说了是从chromium代码里扒下来的,可以看一下楼上的回复

所以说开发者并没有在这上面花钱,而且api也是免费的。但需要说明的是,autosub现在没写让你自定义谷歌云语音转文字的api key的功能,所以你想填自定义的api key的话得要改代码。而且不仅仅是改api key这么简单,因为谷歌云语音转文字的api用法和autosub的这个api不一样,所以你需要把这一块的代码重写才行。