is there a way to calculate how long it will take Alexa to say a certain phrase?
I would like to make Alexa read out a list of articles and be interrupted by the user, if they want to know more about the article Alexa last mentioned. Therefore I need to know the time it takes for Alexa to read out the article titles (in order to know where in list she has been when being interrupted).
Does somebody know a way to do that? Because the article titles are different everytime, manually measuring the time isn't possible.
Thanks in advance for any ideas & cheers from Hamburg
Timo
You could do this one of two ways.
Place in words of varying length, and time them. Then make inferences based on 100% speech speed.
Set a timer across some of your larger, and smaller, article names and get a result set of that, to average it out.
Related
I know this question is fairly simple for you and there are many related answers but none of them explain all what I need.
So you all must have been to YouTube, there you must have seen the Trending Posts Section, where all the videos which have the most views/likes/dislikes (I don't know exactly) w.r.t the time are listed. Now, all those videos are from different different channels.
I want to know:
There must be an algorithm or function inside the server to do that? If there is one, then when do it runs, i.e, are the results kept ready inside the server the same a google search engine --- which keeps the pages stored according to their ranking and whenever someone searches it delivers the result.
The above algorithm goes through every posts, right? But when? How does it knows that this post from this youtuber is getting this amount of views or a lot of views.
Now, after it knows which posts are trending --- where are they stored. Like, if we take mongodb database. Is it kept in a different collection like trending posts or their id's
I know the above questions must be confusing because of my half(or no) knowledge. But, please help me know it all. I am trying to get this answer for a very long time. Any guides or tutorials appreciated. Thanks!
For a "trending posts" feature you would have to store each view/like/etc (whatever you consider as a metric for "popular"). You also need to store a timestamp, so that you can select for "current popularity" as opposed to "in the past". And maybe store some identity of the viewer, so that each visitor is only counted once.
Next you have to find out which post is trending at the moment. For this you would need to find out the posts with the highest number of views in the past timespan. It is up to you (and the nature of the system you are running) whether you use hours, days, weeks or even months.
This query is probably too expensive to run on each pageview, plus the results don't change that much from minute to minute. So you would run this on some schedule, for instance once every hour. Again, it is up to you decide how accurate you want/need it. Maybe run this several times an hour, or just once a day. You do need to store the list of "trending posts" somewhere, so you can display it easily.
Firstly I apologise that this is a bit broad. If there is a better Stack Exchange board, please point me to it :)
I am looking for a way to iterate through a formula hundreds of times (or just constantly running) where a user can adjust a dataset and see the results (again, likely in real time?)
The idea being that I want to look at creating a formula for two players fighting in an RPG game. They will each have some stats, and I want to see what % win rate each has, based on a formula of my own devising.
I know PHP and Javascript, some Java and C# if that helps :)
I have started to tinker with a basic JS script, but I'd like to present a bar showing the % win/loss rates and again, have the interaction element if possible (rather then have to set the values, run it, read the results, rinse and repeat.
funny how your girlfriend stimulates an idea isn't it.
So we've been househunting for sometime, and the main constraint is commute time, however hard i look though there appears to be no way to create a map that shows estimated commute times from a set start point.
This seems odd to me as surely a tool that allowed this sort of data to be plotted would be of benefit to a number of users, supermarkets could show which was your nearest supermarket by driving distance rather than as the crow flies (something that has frustrated me previously)
So - where would i even start on a task like this? Google Maps seems like a good place to start, but apparently needs an A & B and won't function from an A & a distance.
Somebody has suggested openmaps, but i'm not sure if the traffic is overlaid on there, which would definitely need to be a factor for my specific use case when we're talking about commutes.
I'm interested to hear different peoples takes on this, or even if a solution already exists out there (probably as a bespoke piece of software)
Thanks
Neil
This question can probably be broken up into multiple questions, but here goes...
In essence, I'd like to allow users to type in what they would like to do and provide a wizard-like interface to ask for information which is missing to complete a requested query. For example, let's say a user types: "What is the weather like in Springfield?"
We recognize the user is interested in weather, but it could be Springfield, Il or Springfield in another state. A follow-up question would be:
What Springfield did you want weather for?
1 - Springfield, Il
2 - Springfield, Wi
You can probably think of a million examples where a request is missing key data or its ambiguous. Make the assumption the gist of what the user wants can be understood, but there are missing pieces of data required to complete the request.
Perhaps you can take it as far back as asking what the user wants to do and "leading" them to a query.
This is not AI in the sense of taking any input and truly understanding it. I'm not referring to having some way to hold a conversation with a user. It's about inferring what a user wants, checking to see if there is an applicable service to be provided, identifying the inputs needed and overlaying that on top of what's missing from the request, then asking the user for the remaining information. That's it! :-)
How would you want to store the information about services? How would you go about determining what was missing from the input data?
My thoughts:
Use regex expressions to identify clear pieces of information. These will be matched to the parameters of a service. Figure out which parameters do not have matching data and look up the associated question for those parameters. Ask those questions and capture answers. Re-run the service passing in the newly captured data. These would be more free-form questions.
For multiple choice, identify the ambiguity and search for potential matches ranked in order of likelihood (add in user history/preferences to help decide). Provide the top 3 as choices.
Thoughts appreciated.
Cheers,
Henry
This is not AI in the sense of taking any input and truly understanding it.
It most certainly is! You follow this up by stating exactly that:
I'm not referring to having some way to hold a conversation with a user. It's about inferring what a user wants, checking to see if there is an applicable service to be provided, identifying the inputs needed and overlaying that on top of what's missing from the request, then asking the user for the remaining information. That's it! :-)
Inference is at the heart of any topics in AI. What did the user mean? What did the user want? What information should I fetch? How do I parse that information and decide what the answer is?
You're essentially trying to design a state-of-the-art AI system, that uses a combination of NLP techniques to parse natural language queries and then using (maybe) a learning algorithm to determine how to perform the search, possibly hitting a knowledge base, or maybe Google (which also requires a process to parse the returned data to find the answer).
If there is any way you can constrain how input is entered (i.e. how the query is asked), that will help. But then you'll essentially be building a Web form... which has been done a million times over.
In short, you're attempting to create a very complex system but you explicitly don't want to use any of the relevant techniques. If you're attempting to use regexs to do all of this, good luck to you. Because that's one heck of a deep and dark rabbit hole into which I would not want to fall.
But if you insist, start by finding a good book on NLP, because that's where you'll have to start anyway.
With things like SO, Digg, Reddit, etc...
Should one keep track of downvotes in the database independent of upvotes? Or should they simply have a "votes" field that is decremented/incremented based off what the user does with no persisting of that?
How should votes be handled?
On SO, up votes earn +10, down votes -2. For this to work they need to be tracked separately. It's quite possible for a controversial answer to generate a few of each, and just showing an aggregate number won't mean much. So I'd say keep them separate.
I would keep them separate. Some questions have a lot of activity (up and down) and you really like to identify those.
Even if you are not interested in the difference right now, an extra field in the table is not that expensive, so it does not hurt to separate it. Because if you want to add it later, there is no way you can retrieve the data if it is not stored separately.
I also assume SO keeps separate votes for CW and non CW entries. Because if the question changes to CW later on, even with a recalc, the original gained/lost rep is kept.
Depends what you wish to do with your data.
If you only want to display votes than I say you only use one field. It's like number of views of a thread on forum. You want to see what gets most clicks, but not how many times someone viewed it.
Voting system on SO is a bit more complex. Since they can cancel all votes from particular user they have to keep track of who voted for/against what. This, I think, is written in another table, but because it is expensive to recalculate all votes every time someone views a question, they keep calculated value in a field, changing it whenever someone votes.
I can advise you to store them separately maybe even with extra data who authored a particular up or downvote. Who knows, you may come up with a nice idea tomorrow and you will need this additional data to implement it.
But it would also be good to have a sort of pre-calculated field (let's call it cache) which is updated whenever an up- or a downvote is submitted. The pages will then be rendered with this precalculated field. This will increase the response time and lessen load on DB.
If it is too costy to recalculate values immediately you may consider runnning some scheduler tasks (once per hour?) which will process up-to-date votes and recalculate the cached values.
Considering the amount of data you'll have in the database for social voting website the additional space for an extra int column to store down-votes is going to negligible so you'd be crazy not to.
Well, given that SO has +10 for an upvote and -2 for a downvote, and there's recalculation occasionally going on, it would need to store them independently.
Otherwise an answer with 10 upvotes and 5 downvotes which originally gave you 90 points, this would recalc to 50 if they weren't stored separately.
I'd keep them separate so that I could review them separately. Socially, upvoting is very different to downvoting, and I'd want to be able to look at them independently if it were me.
Definitely separately for one very simple reason. Tomorrow you'll want to do something extra that needs that information (some sort of report or graph for example). Besides keeping them separately costs you nothing.
since people can usually vote once, and (in SO for example) can cancel their votes, you need to know who voted, at what time, what vote, and on which item.
I am certain that the downvotes and upvotes are kept separately, though there could be an aggregate field that keeps the count. SO lets you change a vote later (make the downvote an upvote), and that's why I believe the votes are logged for each user too.