You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
Thank you for looking at this question. I am encountering failure of the say and play_wav functions after invoking the client.recognize method of CloudSpeechClient. I've not been able to find the cause. This pertains to the following environment:
VoiceHat Version 1
Raspberry Pi 3B+
OS: aiyprojects-2021-04-02
27 Aug - I discovered that if the RPI desktop PulseAudio Volume Control is open when I run this test the code executes as expected. In fact, none of the voicehat disable / enable entries appear in syslog, only an initial enable from PulseAudio Volume Control. Not a real fix to the issue - any help toward that end is appreciated.
If the sample code below is run with the client.recognize and print statements commented out, it will run continuously with no errors. With those lines included and executing, following calls to the say and play_wav functions do not work. No errors are returned by python, though the following syslog entries (tail -f syslog | grep voicehat) are interesting:
Line 1 corresponds to the first say call
Line 2 seems to occur at the end of the recognize period
Line 3 occurs partially through the 2nd play call, no further enable is encountered and say and play_wav no longer produce any audio output.
Thanks again for looking at his. Any ideas are greatly appreciated!
from aiy.voice.tts import say
from aiy.voice.audio import AudioFormat, play_wav, record_file
from aiy.cloudspeech import CloudSpeechClient
def main():
client = CloudSpeechClient()
while True:
first say call
say("this is step 1 of the series of tests to examine audio output behavior one two three four five", volume=30)
play_wav('/home/pi/Sounds/chime.wav')
logging.info('at recognize step')
text = client.recognize()
print('received text: ',text)
second say call
say("this is step 2 of the series of tests to examine audio output behavior one two three four five", volume=30)
play_wav('/home/pi/Sounds/sweep.wav')
third say call
say("this is step 3 of the series of tests to examine audio output behavior one two three four five")
play_wav('/home/pi/Sounds/sweep.wav')
if name == 'main':
main()`
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Thank you for looking at this question. I am encountering failure of the say and play_wav functions after invoking the client.recognize method of CloudSpeechClient. I've not been able to find the cause. This pertains to the following environment:
VoiceHat Version 1
Raspberry Pi 3B+
OS: aiyprojects-2021-04-02
27 Aug - I discovered that if the RPI desktop PulseAudio Volume Control is open when I run this test the code executes as expected. In fact, none of the voicehat disable / enable entries appear in syslog, only an initial enable from PulseAudio Volume Control. Not a real fix to the issue - any help toward that end is appreciated.
If the sample code below is run with the client.recognize and print statements commented out, it will run continuously with no errors. With those lines included and executing, following calls to the say and play_wav functions do not work. No errors are returned by python, though the following syslog entries (tail -f syslog | grep voicehat) are interesting:
Line 1 corresponds to the first say call
Line 2 seems to occur at the end of the recognize period
Line 3 occurs partially through the 2nd play call, no further enable is encountered and say and play_wav no longer produce any audio output.
Thanks again for looking at his. Any ideas are greatly appreciated!
Jeff
--------------------------------- sample code -----------------------
`#!/usr/bin/env python3.7
import argparse
import locale
import logging
from aiy.voice.tts import say
from aiy.voice.audio import AudioFormat, play_wav, record_file
from aiy.cloudspeech import CloudSpeechClient
def main():
first say call
second say call
third say call
if name == 'main':
main()`
The text was updated successfully, but these errors were encountered: