Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
$ pip3 install voicy -U
For a request to the Google Cloud client, you need to provide a token. You can easily get it using GoogleToken object, or in a browser by yourself.
Both options are described below:
from voicy import GoogleToken
GoogleToken.get_token(rucaptcha_key="Key, that you got in the rucaptcha account.")
For using TTS you need to provide a dictionary where the key is your language code and the value is your voice model. Format to both you can find in docs. Also, if you don't want to get a token you can use a TTS from Google Translate.
from voicy import Google
google = Google(token="token")
print(
google.tts(
text="You are using a Voicy library. Please, give a star, if you like it.",
voice={"en-US": "en-US-Wavenet-A"},
)
)
File(path="84PFetz5IJdT4Je.wav", format="wav")
For using STT you only need to provide a language code. Format for it you can find in docs.
from voicy import Google
google = Google(token="token")
print(
google.stt(
file="84PFetz5IJdT4Je.wav",
language_code="en-US",
)
)
Transcript(text="You are using a Voicy library. Please, give a star, if you like it.", confidence=0.93750596, path="84PFetz5IJdT4Je.wav", format="wav")
For using Yandex TTS you don't need to provide any token. Just pass text, language code and voice model:
from voicy import Yandex
yandex = Yandex()
print(
yandex.tts(
text="You are using a Voicy library. Please, give a star, if you like it.",
language_code="en-US",
voice="ermil",
)
)
File(path="SUypGpSLTvGKTTy.wav", format="wav")
The library is under the GNU LGPLv3 license.
BE AWARE THAT THE AUTHORS ARE UNDER NO CIRCUMSTANCES RESPONSIBLE FOR CONSEQUENCES OF USE AND ANY INTERACTION WITH THE LIBRARY. NOT LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE CODE IS PROVIDED FOR EDUCATION PURPOSES ONLY.
Read the LICENSE for more information.
FAQs
Wrapper for free use Google cloud TTS.
We found that voicy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.