Hello Friends,
In this video i have implement the better Google search. Now, it will speak the result instead of just showing on browser.
Now, there is no need to download mp3 from AWS Polly services. You can just download and delete it from directory.
I hope you will find this video useful as previous ones.
Github : https://goo.gl/UM5m8D
Playlist : https://goo.gl/4sLjHp
If you have not subscribed the channel please hit the subscribe button and press the bell icon. You can connect…
@Try2Catch
please bro ..help me …i am not using amazon polly …i am using pc build voice ..i can't access google search …help me ..thanks
you are so good. good luck
Bro, I'm getting this error:
Traceback (most recent call last):
File "D:/MARVEL/JARVIS_v3.py", line 119, in <module>
google_search_result(voice_note)
File "D:/MARVEL/JARVIS_v3.py", line 43, in google_search_result
polly_sound(result.description.replace('…','').rsplit('.', 3)[0])
File "D:/MARVEL/JARVIS_v3.py", line 31, in polly_sound
with open(mp3_name, 'wb') as file:
PermissionError: [Errno 13] Permission denied: 'output.mp3'
sir please help with my problem, I get an error like this :
"C:projek pythonjarvisvenvScriptspython.exe" "C:/projek python/jarvis/jarvis_v2.py"
4 Okt 2017 – Planet Earth has an abundance of water that makes it unique and perfect for life to exist.
Traceback (most recent call last):
File "C:/projek python/jarvis/jarvis_v2.py", line 43, in <module>
google_search_result('what is earth')
File "C:/projek python/jarvis/jarvis_v2.py", line 41, in google_search_result
play_sound_from_polly(result.description)
File "C:/projek python/jarvis/jarvis_v2.py", line 29, in play_sound_from_polly
obj = polly.synthesize_speech(Text=result, OutputFormat='mp3', VoiceId='Brian')
File "C:projek pythonjarvisvenvlibsite-packagesbotocoreclient.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "C:projek pythonjarvisvenvlibsite-packagesbotocoreclient.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the SynthesizeSpeech operation: The security token included in the request is invalid.
Process finished with exit code 1
Bro i have this error pls help me
Missing required parameter in input: "OutputFormat"
Unknown parameter in input: "OutputFromat", must be one of: Engine, LanguageCode, LexiconNames, OutputFormat, SampleRate, SpeechMarkTypes, Text, TextType, VoiceId
pls…..????????????
Sir ı am getting this error:
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.
Hello
I'm getting an error
"botocore.exceptions.NoCredentialsError:Unable to locate credentials"
How to fix this error?
plzzzzz can someone tell me where can i download this software???link???full details???thank you everyone…and this video gonna make my dream comes true..
Do I need to pay with my credit card for creating account in AWS?
Sir kya koi process hai python ke aws polly module ke sath…
sir i got another error
raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
Error 263 for command:
open "t" alias playsound_0.0691196174592
The specified device is not open or is not recognized by MCI.
sir i got this error
botocore.exceptions.ClientError: An error occurred (InvalidSignatureException) when calling the SynthesizeSpeech operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
polly = boto3.client('polly')
counter = 0
def play_sound_from_polly(result):
global counter
mp3_name = "output{}.mp3".format(counter)
print(mp3_name)
obj= polly.synthesize_speech(Text=result, OutputFormat='mp3', VoiceId='Joanna')
print(type(obj))
# to playsound with the help of playsound() we need to create mp3 file
with open(mp3_name, 'wb') as f:
f.write(obj['AudioStream'].read())
f.close()
playsound(mp3_name)
os.remove(mp3_name)
counter = counter + 1
def google_search_result(query):
search_result = google.search(query, lang='en')
for result in search_result:
print(result.description)
play_sound_from_polly(result.description)
break
google_search_result("who is Narendra Modi")
exit()
After executing this code my mp3_name file is still empty
which version python support Google-Search-Api? I couldn't install this. my project on python3.6
please help me
i am getting no region error for polly
why am i getting:
Traceback (most recent call last):
File "C:UsersUserDesktopsearch_directory.py", line 2, in <module>
polly = boto3.client('polly')
File "C:Python27libsite-packagesboto3__init__.py", line 79, in client
return _get_default_session().client(*args, **kwargs)
File "C:Python27libsite-packagesboto3session.py", line 192, in client
aws_session_token=aws_session_token, config=config)
File "C:Python27libsite-packagesbotocoresession.py", line 760, in create_client
client_config=config, api_version=api_version)
File "C:Python27libsite-packagesbotocoreclient.py", line 52, in create_client
service_model = self._load_service_model(service_name, api_version)
File "C:Python27libsite-packagesbotocoreclient.py", line 77, in _load_service_model
api_version=api_version)
File "C:Python27libsite-packagesbotocoreloaders.py", line 119, in _wrapper
data = func(self, *args, **kwargs)
File "C:Python27libsite-packagesbotocoreloaders.py", line 338, in load_service_model
service_name, type_name)
File "C:Python27libsite-packagesbotocoreloaders.py", line 119, in _wrapper
data = func(self, *args, **kwargs)
File "C:Python27libsite-packagesbotocoreloaders.py", line 280, in determine_latest_version
return max(self.list_api_versions(service_name, type_name))
File "C:Python27libsite-packagesbotocoreloaders.py", line 119, in _wrapper
data = func(self, *args, **kwargs)
File "C:Python27libsite-packagesbotocoreloaders.py", line 309, in list_api_versions
raise DataNotFoundError(data_path=service_name)
DataNotFoundError: Unable to load data for: polly
I have an problem while using boto3 can you help me please
sir i m tryng to install pyaudio but this is showing errors
To solve polly.client problem :
import boto3
polly_client = boto3.Session(
aws_access_key_id=,
aws_secret_access_key=,
region_name='us-west-2').client('polly')
response = polly_client.synthesize_speech(VoiceId='Joanna',
OutputFormat='mp3',
Text = 'This is a sample text to be synthesized.')
file = open('speech.mp3', 'w')
file.write(response['AudioStream'].read())
file.close()
and to get keys:
create a free account on aws.amazone.com for 1 year then check your keys, free for one year.
Sir I am unable to import Google-Search-Api on windows or on my project…. I am currently Running python 3.7…. Is there another Api that can work same as google search Api. ..
raceback (most recent call last):
File "C:/Users/Yashi Agarwal/PycharmProjects/Yashinew/alexa21.py", line 136, in <module>
google_search_result(voice_note)
File "C:/Users/Yashi Agarwal/PycharmProjects/Yashinew/alexa21.py", line 47, in google_search_result
play_sound_from_polly(result.description.replace('…','').rsplit('.', 3)[0])
File "C:/Users/Yashi Agarwal/PycharmProjects/Yashinew/alexa21.py", line 31, in play_sound_from_polly
obj = polly.synthesize_speech(Text=result, OutputFormat='mp3', VoiceId='Joannna')
File "C:UsersYashi AgarwalPycharmProjectsYashinewvenvlibsite-packagesbotocoreclient.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "C:UsersYashi AgarwalPycharmProjectsYashinewvenvlibsite-packagesbotocoreclient.py", line 623, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the SynthesizeSpeech operation: The security token included in the request is invalid.
Process finished with exit code 1
i am facing following error when using boto3 client…. botocore.exceptions.NoRegionError: You must specify a region.
You are doing great job man.
I am new suscriber of your chennel and i am too impressed with your job . I #thing which i was searching for many year u provide me.
#THANK_YOU
hello ! how can i make this firiday to response faster?
I suscribed your channel and never unsuscribe you!!! Hope you will do same and don't unsuscribe me!!!
1- Thanks for the video series
2- How can I use another type of AWS service? because the AWS is free but I don't have credit card to register.
i'm having trouble with amazon polly.
The AWS Access Key Id needs a subscription for the service""""" this error is showing. 🙁
Very nice…Really helpful ….Thanks man……
wow another grate video keep it up
I am so excited to see of the final form of friday
Awesome tutorial