Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
A Media Toolkit.
Text-to-speech is currently available.
Other features will be developed in the future.
Thanks for Microsoft Azure!
0.1.4 - 0.1.6: Fixed some issues.
0.1.3:
0.1.2:
0.1.1: Text-to-speech is currently available.
from media import Voice
text = "One Piece! Dragon Ball! Doraemon! Naruto!"
voice = Voice("YourSubscriptionKey", "YourServiceRegion")
# use English
voice.speak(text)
# use Japanese
voice.speak(text, lang=Voice.LANG.JA_JP, voice_name=Voice.NAME.FEMALE.JA_JP_NANAMI)
# Save the voice file to the local
voice.save(text)
from media import Voice, SSML
voice = Voice("YourSubscriptionKey", "YourServiceRegion")
ssml = SSML()
# If you want to modify the phoneme of a word, add '[]' in text
ssml.voice = {
"text": "His name is Mike [Zhou]",
"phonemes": [{
"word": "Zhou",
"alphabet": "ups", # default: sapi
"ph": "JH AU",
}]
}
voice.speak(ssml)
The values of
alphabet
andph
can refer to here, see: "Use phonemes to improve pronunciation - Azure"
success = voice.speak()
if not success:
# do something...
print(voice.error)
# do something...
from media import SSML
ssml = SSML()
# for human
print(ssml)
# for program
ssml.dump()
Text-to-speech, in a different tone.
from media import Voice, SSML
voice = Voice("YourSubscriptionKey", "YourServiceRegion")
ssml = SSML(lang=SSML.LANG.ZH_CN, voice_name=SSML.NAME.FEMALE.ZH_CN_XIAO_XUAN)
ssml.voice = "啊?"
ssml.voice = {
"text": "这是可以说的吗?",
"role": SSML.ROLE.YOUNG_ADULT_FEMALE,
"style": SSML.STYLE.CHEERFUL,
"rate": SSML.RATE.MEDIUM,
}
ssml.voice = {
"text": "啊,可以可以",
"name": SSML.NAME.FEMALE.ZH_CN_XIAO_MO,
"style": SSML.STYLE.FEARFUL,
"role": SSML.ROLE.OLDER_ADULT_FEMALE,
"degree": "2",
}
ssml.voice = {
"text": "没事没事",
"name": SSML.NAME.FEMALE.ZH_CN_XIAO_MO,
"style": SSML.STYLE.SAD,
"role": SSML.ROLE.OLDER_ADULT_FEMALE,
"degree": "2",
"rate": SSML.RATE.FAST,
}
# It will play the generated speech
voice.speak(ssml)
If you want to save:
voice.save(ssml)
If you want to save and customize the name or location:
voice.save(ssml, path="这是可以说的吗.mp3")
FAQs
A Media Toolkit. Text-to-speech is currently available.
We found that media 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.