import inspect import boto3 from contextlib import closing polly = boto3.client('polly') print(polly.describe_voices()['Voices'].keys()) _voice_list = [ (item['Name'], "%s (%s)" % (item['Name'], item['LanguageName'])) for item in sorted(polly.describe_voices()['Voices'], key=lambda x: x['LanguageCode']) ] for item in _voice_list: print(item) print("Total: %d voices" % len(polly.describe_voices()['Voices'])) print(inspect.signature(polly.synthesize_speech)) # # response = polly.synthesize_speech(VoiceId='Kendra', # Text='<speak>&</speak>', # TextType='ssml', # OutputFormat='mp3') # # # with closing(response['AudioStream']) as stream: # with open('test_polly.mp3', 'wb') as f: # f.write(stream.read())
@lyp-bobi Haha probably yes. There is also a new pre-release available only for Ubuntu. https://github.com/kokimame/joytan/releases/tag/latest-draft-ubuntu
Was the script working? If you get an error, let me know. Even though there is an issue regarding ffmpeg, I confirmed that Polly is working in Windows at least in my environment. I am here as long as you need help :) or on our Slack. http://slack-invite.joytan.pub/
If you have a list of vocabulary or sentences or memrise courses, I can make an audio/textbook for free. If it's Japanese, I can provide native pronunciation.
NOTE: Videos were created from two resources. One is audiobooks which were created with Joytan, the other is image clips which were created separately from the app. Video-making feature is not included in the current version of Joytan.
I may only leave this online for a while, since TTS often makes mistakes and may not be so good for students studying a language.
If your language level is high enough to know which ones are wrong, then maybe it's OK, but this video wouldn't be good for beginners.
I created this, using JoyTan, then copying the output folder with the individual files before those files got deleted.
After that, I created a program to load in the individual audio files and displaying the text that I used to create the video files.
Perhaps you could do something like that.