Author Topic: TTS talking head - use of PNGs instead on JPGs  (Read 8952 times)

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #15 on: June 19, 2015, 08:08:56 AM »
Make sure to completely close VC then replace the dll and make sure that windows is not blocking it by right-clicking the dll and checking properties.

@marcusvdt -- as James explained, you should make sure that Windows is not blocking the dll. It almost always will when you first download  a dll file.

This screenshot is just from the Web. The same thing applies here.
« Last Edit: June 19, 2015, 08:58:27 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #16 on: June 19, 2015, 11:02:35 AM »
Thanks!
I must have done something wrong yesterday. Maybe I was too asleep?!?!
I admit I did not check this button yesterday. Today I renamed the original DLL again, copied the modified DLL to the respective folder and then I checked if such button was there in the properties dialog for the modified DLL: it was not there!. Anyway, I decided to try one last time and ran VC. It worked! WoohoooooO!

This fits my needs for now!

Btw, the standard window size for the talking head is always 430x320 or it is calculated based on the screen resolution? I'm asking this because I want to create the images for the animation so they fit the standard size of this window.
On a quick sample test, I've noticed that upsizing the window through tts.movehead will significantly decrease redraw performance, making it unusable (at least on this slow PC that I'm using for VC, and I upsized to fit the entire screen).


I'll be preparing the images as soon as you respond the above question and I'll see if I can minimize the jerky edges to end up with something beautiful. It would be easier if the outside edges where not round as in a circle! But anyway, I'll try...

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #17 on: June 19, 2015, 12:53:04 PM »
It's a standard size always.  I don't know off-hand what the exact size is.  You can set it to anything you want though so I don't think it matters.  Changing the size should not slow performance in and of itself, it's just that the bigger you go the more work it will need to do I guess.  It will probably also depends on the size of your images.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #18 on: June 19, 2015, 09:36:46 PM »
I'm happy to say that it worked fine but I had to kind of tweak the source images. Jpeg images won't give acceptable results anyway and I ended up using pngs. As soos as I get back to the computer I'll record a video to show the first draft to you guys, it is really cool! Then I'll write more about it so I can try to convince you to allow pngs instead of jpegs.
Btw, the size of the window is 430x240

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #19 on: June 20, 2015, 02:40:55 AM »
Here is the link for the video. I think it got so cool for a draft. See how I made it look to be an animated part of my rainmeter theme. I made it to look like semi transparent over the rainmeter components. This is so cool and the possibilities are endless for creative minds.
https://youtu.be/Cd6jsa76Jmc


Please ignore the bg sound. My son was playing GTA 5 online and talking to his friends through the kinect while I was recording. Also I think the quality of the image is not so good as the image that I see here... I was recording a Team Viewer session on a slow PC. But anyway, you will get the idea.

Another thing to notice just in case you understand portuguese, the light that is near me on the small webcam window is what I call in my commands as "abajur". I've mounted the node for that light on a box and after I mounted it I noticed the wiring for the relay was inverted, hence when I turn it off by a voice command (I say "desligado", and VC sends a logic zero to the node), it is resulting in the light turning on. For the "ligado" command, the light is turning off. This is not a problem with VC, it is just that I have other priorities now and I'm not going to open the box to fix it so soon. All of this stuff are prototypes as of now.

Regarding the animation and the DLL:
I produced the pngs for the animation without any transparent color. I used a pure black background to conform with the settings of the form. I used pngs and later renamed them to jpgs. I did it this way because of jpegs are always compressed, even if you choose the least amount of compression when saving them. The edges getting wrong is one of the possible consequences. I'm also a professional photographer and sometimes I experience this behavior with jpegs when I want a seamless bg to be pure white or pure black. It depends on the compression you apply. Even having a perfect black bg (RGB = 0,0,0), the black around the non black edges will get jerky and hence produce undesired results. The same applies to pure white (255,255,255). This is a known issue with jpegs.
So to avoid the need to rename the files, I would like to suggest that PNGs are used per default. Or maybe you can allow various file types. This is if you decide to implement the transparency as a standard plugin option. You could allow the user to choose on the plugin option window which RGB color will be transparent.
« Last Edit: July 09, 2015, 06:32:53 PM by marcusvdt »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #20 on: June 20, 2015, 11:29:25 AM »
Thanks for posting the video.

Although it's a bit hard to hear the TTS with the background noise, it looks like you've done a nice job integrating the TTS visual feedback with your Rainmeter desktop.

It's a cool example of how users can imagine and create custom solutions that work with their own personal systems (with a bit of effort of course!).

What happens when you run a program such as a web browser? Doesn't the TTS display window appear on top? Or are you using an event trigger to hide the "talking head" window when you are not displaying the Rainmeter desktop?

TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #21 on: June 20, 2015, 11:55:44 AM »
For now, it remains on top.The initial idea was to keep it over anything but semi transparent, because I thought it would be easier for you guys to implement it. Now the idea is to selectively show or hide the talking circle, depending on what is running on the foreground.  I'm going for an event like you said or a custom action in Python.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #22 on: June 20, 2015, 05:18:07 PM »
while Jarvis is not my favorite interface, I think the idea of using abstract images is a stroke of a genius ... good job
When Voice command gets tough, use hand gestures

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #23 on: June 20, 2015, 06:17:41 PM »
I will release a new version of the plugin soon.  I don't think I'll put anything new into the UI for now, but instead add some actions that allow advanced users to specify a transparent colour for the background, and also one to fade the opacity of the entire talking head window.  That is, make the visible parts, slightly transparent.  You'll be able to set an opacity from 0 to 100, similar to what you can do with the status overlay using the OSD.SetOverlayFade action.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #24 on: June 20, 2015, 06:28:40 PM »
@Haddood, thanks. I hope someone else may come with creative interfaces.

@James, that's fantastic. It simply covers all the needs very well!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #25 on: June 20, 2015, 06:39:18 PM »
OH, and I'll add support for pngs and animated gifs as well.  I don't think it will be too difficult.  I can't guarantee what kind of performance you'll get though in terms of speed.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #26 on: June 21, 2015, 11:19:13 PM »
Great!
Let me know if you need a beta tester.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #27 on: June 22, 2015, 11:37:38 AM »

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #28 on: June 22, 2015, 08:58:43 PM »
@james ... nice update to VC  :clap :clap
When Voice command gets tough, use hand gestures

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #29 on: June 25, 2015, 03:23:31 PM »
Just to let you guys know, with the new opacity parameter the integration with my desktop theme is even better.
Unfortunately I can't make much videos as I would like because the slow Atom mini PC that I'm using for VC does not handle it very well. Even capturing de video via TeamViewer results in the CPU rising to 100%.

The new version is working preety good, so +1 about the version 2.1.5.0, it is a fantastic update!

Thanks James! You rock!