Author Topic: {item.genre} and catered responses.  (Read 2704 times)

0 Members and 2 Guests are viewing this topic.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
{item.genre} and catered responses.
« on: August 07, 2013, 11:04:58 AM »
I'm wanting the TTS to alter style of announcing reliant on the {item.genre} payload.  

Simply put.  If a track is from the era 1995 to 2000, a response is given. "Now for some late 90s goodness" LOL!  Same goes for a track from the 1950s to the 1970s "Now for something way back"

I thought of using the new Maps functionality but I don't think Map.Get is currently sending back payloads.  Could be done with Logic Blocks if (A)Contains(B) but I would have to make a logic block for each year, would I not?

Before I spend a week trying to work this out, thought I'd ask the greater community :) aka James LOL! :D

Any idea's anyone!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: {item.genre} and catered responses.
« Reply #1 on: August 07, 2013, 03:00:26 PM »
First of all I think you need to look at the date or year field, not the genre but that is another matter.

It won't be long until I release another version with the map.get fix, so you may just want to wait for that.

logic-blocks are an option, but only if you have a few possible outcomes, otherwise it starts to become cumbersome (up to you)

You could also try using a payloadXml file and the action: PayloadXml.GetPhrase

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: {item.genre} and catered responses.
« Reply #2 on: August 07, 2013, 03:03:32 PM »
You doesn't need a logic block for each year, you can use in the (A) parameter for (A)contains(B) as example : 50 51 52 53 54 55 56 57 58 59 60
I think this would work.
So the command trigger a action if the result contain any number from 50 to 60
« Last Edit: August 07, 2013, 06:18:10 PM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: {item.genre} and catered responses.
« Reply #3 on: August 07, 2013, 04:34:50 PM »
This will depend on what format you get back.  Assuming you get a date back with a 4-digit year, you could try

if A contains B:    {whateverContainsTheYear}   --    195
would be a 50s song  (or the song might be from 1195 or 2195  :biglaugh)

if A contains B:    {whateverContainsTheYear}   --    196
would be a 60s song

etc.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: {item.genre} and catered responses.
« Reply #4 on: August 07, 2013, 05:01:55 PM »
Haha, I think the sound quality of a song from 1195 is recorded really bad and for songs from 2195 you need a Hyper-Ultra-Quarks player with antimatter generator impuls drive  ::yikes
« Last Edit: August 07, 2013, 05:10:44 PM by jitterjames »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: {item.genre} and catered responses.
« Reply #5 on: August 07, 2013, 05:11:49 PM »
Perhaps it's possible that someone from 2195 found a way to go back in time and record a live classical music performance...  :o

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: {item.genre} and catered responses.
« Reply #6 on: August 07, 2013, 10:05:19 PM »
LOL sorry typo! Obviously not {item.genre} I meant {item.year} and yes is does return back with a four digit date. 

Man my typo's wrote this just before going to bed as I was hoping to catch yah in your native time zone :)

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: {item.genre} and catered responses.
« Reply #7 on: August 07, 2013, 10:08:14 PM »
But yeah that sounds brilliant.  Thanks for clarifying guys!  Appreciate the input.  I'll play around but yeah I will probably just wait for Map.Get. 

Thanks guys.