-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2 way audio support #344
Comments
Audio is supported in the stream. |
Can I help you? I saw something about 2 way audio here homebridge-plugins/homebridge-camera-ffmpeg#738 |
The problem here is how to inject audio to the device, not how to stream it. |
Do you mean the problem with detecting the sound card to transfer audio from the device to the camera speaker? |
Audio devices are in use by rmm process. |
I got it. |
Do you want to try a beta? |
Yes |
How it works: If you want to use a tts engine download nanotts from here:
|
What about without header? Do you mean without file name? |
Will all my configuration data be deleted after flashing? |
Yes, save it in Maintenance page. |
Hello! |
Which one audio card you use for send audio to speaker? For example I can send audio to speaker via ffmpeg Maybe I can send somehow audio to speaker via ffmpeg? |
The cam support alsa via tinyalsa lib. |
I already used this one
Anyway thank you! |
ffmpeg from local shell or remotely? |
ffmpeg on my raspberry-pi |
You could try to create a new web service with this code:
Pay attention to the permission 0755 |
I should create via ssh or another way? |
Thanks a lot! |
@roleoroleo can you compile firmware for me with add speaker service please? |
Check the release section. |
You are the best! |
How can I use the new "speaker" function in version 0.4.1??? |
speak.sh speaker.sh |
Any idea of how to tie this with TTS from Home Assistant to send audio to the camera? |
@roleoroleo, on actual version of firmware service speak and speaker not working. my curl: only work without
But no audio coming ↓↓↓↓↓ Here it was working |
I hate to say it, but the volume through the media_player interface is too low to be usable. Using both tts and play_media the volume is to weak. I can likely get around play_media by increasing the volume in the .mp3 file, but I can't see a way around this using tts. Any advice is welcome... Thanks! P.S. Even without a VOL option, maybe you could just always include a high volume as the default in the ffmpeg conversion: ffmpeg -filter:a "volume=25dB" P.P.S. Is there an FFMPEG environment variable which one could set their own ffmpeg options? Or what about the "extra_arguments" in the HA ffmpeg platform variable? |
I seem to remember seeing " -rtsp_transport tcp" when installing the integration. Could I add -filter:a "volume=25dB" there? I can't find where/how to "reinstall" or "reconfigure" the integration. Do I have to delete it and reinstall to get back to the field which had "-rtsp_transport tcp" in it? Sorry for the multiple posts... |
I found the "extra_arguments" option in:
Should I stop HA, change it there and restart?
|
Still working on this... I ran a test and using "ps" I was able to see where the yi-hack Home Assistant integration runs ffmpeg as follows:
However, I do not see the "-rtsp_transport tcp" option in the call to ffmpeg, though it was specified when the integration was initially configured as confirmed in the .storage/core.config_entries file above. What am I missing here? Is "extra_arguments" really being used/honored or is this a bug, or am I completely off base? Thanks for any help! |
FYI, I just noticed, in the alpha python code above, the line:
makes no reference to "extra_arguments", and shows only the options I see in the "ps" above. |
You are right. |
Thanks! There's also another issue with the camera media player not showing up as a Chromecast device. Ie, I would like to be able to say:
"Hey Google, Broadcast to frontdoor: Hi, I'll be right there."
but the media player camera "frontdoor" is not recognized. The command "catt scan" does not list it either. ...don't know if this is fixable, but it would be a nice feature. Should I open a new issue for this?
|
P.S., I noticed that the Google Home media_players are listed with "Google Cast" integration, whereas the media_player.frontdoor_camera is listed with "Yi Cam with yi-hack" integration. Might it be possible to lift some code from the Google Cast integration? It looks like to work, the camera has to be "discoverable" as a chromecast device. |
I think this isn't a simple task. |
Now I remember. |
Certainly. Not sure I know how to do that though...
Is the boost parameter an on/off switch or a value? I found I had to set:
"-filter:a volume=3" to be effective.
Is there a release file somewhere?
…On Wed, Nov 17, 2021, 7:30 AM roleo ***@***.***> wrote:
Now I remember.
The extra_argument parameter is useful for video capture process.
I think it's not correct to mix these options in the ffmpeg call.
But I added a new parameter "Boost speaker" that you can check during
integration (default true).
Do you want to try the last commit?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADFMVIQLVXCN6VQMFLKDUO3UMO4BRANCNFSM42RCBFIA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I was using
I only change for mstar camera, for allwinner camera the volume was loud enough Could we make boost audio an extra config. like video capture extra_argument? |
But I need help to add the right parameter for all models: mstar, allwinner and allwinner-v2. |
As I mentioned above, for Allwinner-v2, I had to use:
The "3" means 3x the original volume. However, in my opinion, it would be nice to allow a text field to let the user specify any options needed. The "Boost" check box could be in addition, if the user does not know what ffmpeg arguments to use. And, if extra_arguments is not used, is should not appear. Is there a reason it is still in the "yi-hack configuration" window shown above? |
Not sure this is your problem, but do you know of a way to reconfigure the yi-hack_ha_integration or do I need to delete it and reinstall each time? And with multiple cameras, do you install it over again, once for each camera? |
I think I answered my own questions:
It appears that the Boost setting applies to all cameras, which works for me. :) |
extra_arguments is used to take the snapshot and to get stream. I can't remove it.
No, I think there is no way.
Yes, once for each camera. When you update, you don't need to remove and reinstall the cams. |
So... vol option seems to be deprecated. What about changing the boolean option with a integer multiplier? |
"changing the boolean option with a integer multiplier" would be great! That's all that is needed. Please post when this is implemented and I will download and test it. I downloaded the current code and it works great. Looking forward to the release which lets me set volume=[1234] etc! Thanks you have really created a great hack. No other camera hack even comes close! |
Update: The media_player entity from the "yi-hack_ha_integration" seems to have quit working since I updated. Entering "test" in the tts screen (see attached) does nothing. I have confirmed the camera and audio are on (ie, it plays a pcm through the fifo fine), but tts plays nothing now. Hope this isn't something I have done wrong. I do see ffmpeg running when I click "send" as follows:
but no sound results from the camera. Can you suggest any other troubleshooting tests? |
Do you want to try the last commit? |
Yes, will do...
…On Fri, Nov 19, 2021, 11:02 AM roleo ***@***.***> wrote:
Do you want to try the last commit?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADFMVIWEZTW5L7VSWEHWXULUM2GLTANCNFSM42RCBFIA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Installed last commit,,, tts.google_say is now working! However, media_player.play_media is not. From the Developer Tools -> SERVICES menu:
Produces no sound. Whereas it works when entity_id is a Google Home Mini. From DEBUG level output in the HA log I see:
The volume via TTS is now loud and clear (at 3x) and I can see it is correctly set when ffmpeg runs. Please advise re: media_player.play_media Thanks as always! |
Hold on... I just discovered it is working on the frontdoor camera but not the backdoor camera. They are supposed to be identically configured and are the same model. I deleted and reinstalled the integration for the backdoor camera, but not for the frontdoor. I am not clear where/what changes in a reinstall. I.e., they both are using the same new media_player.py. Should I delete and reinstall the frontdoor camera and see if it breaks it? |
I also noticed this, from
I.e., no "boost_speaker" is included in the frontdoor config. I doubt this is relevant, as it likely only applies to the tts service, but it is the only difference I could find in the configurations. I will reinstall the frontdoor with the x3 boost and see if it causes the frontdoor to quit working via media_player.play_media service. |
OK, I reinstalled the frontdoor with the x3 boost and it is still working, both play_media and tts. So there must be something misconfigured on my backdoor camera. I will keep looking... Sorry for the premature alarm. Any ideas/suggestions which may come to mind are welcome. :) |
I think I have found the problem... For the backdoor, in the media_content_id: field, in was using "/local/audio/hello.mp3". For the frontdoor, I was using "https://mydomain.com/local/audio/hello.mp3" When I switch to the Fully Qualified Domain name for the backdoor, it worked. I was certain that HA appended the domain name (base_url from the configuration.yaml file) when the media_content_id started with a slash (/), but apparently not. Live and learn... and sorry for the false alarm! P.S. |
I think /local/audio (without http) refers to the local file system. |
But it works one way with google home speakers and another with the camera
speaker. It should be the same.
…On Sat, Nov 20, 2021, 1:52 AM roleo ***@***.***> wrote:
I think /local/audio (without http) refers to the local file system.
If I donwload the mp3 file to /tmp and I play it with
media_content_id: /tmp/hello,mp3
it works.
Probably it depends on how media_id is handled.
In my case is sent directly to ffmpeg.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADFMVIVURWC55VNQETTBITDUM5OTPANCNFSM42RCBFIA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hello @roleoroleo
Is it possible to add 2 way audio or just audio support for this camera Yi 1080p Home 9FUS (y203c)?
The text was updated successfully, but these errors were encountered: