Audio-to-Text API? - php

Are there any (free) speech-to-text API's that I could use with PHP? (I only know PHP and html/css.)
I'd like to send it an audio file, then have it return the transcription.

I haven't found any free APIs but there are a few relatively inexpensive ones:
Quicktate
PhoneTag
Twilio
The first two let you supply an MP3, whereas Twilio (which has the best rates) gets input through their own system, so your choice will depend on your application.
(You'll have to Google PhoneTag and Twilio; I can't post more than one link at my current reputation.)

Voice recognition is computationally rather expensive - it's defnitely not the kind of project you'd implement using PHP - OTOH you might create a web-based interface or integrate in a web / IVR type application using PHP as the glue (the voice search on Android is very cool).
So although there are some off-the-shelf toolkits available, you're probably going to be writing a lot of C code to do anything interesting with them. And how you get on depends a lot on the OS you are using (not stated - example link the first hit from Google).

Dynaspeak from SRI could work.

Related

How does Firebase work with PHP?

I am new to coding and I am very confused in terms of what Firebase can do for me. I don't know how it will integrate with my web application.
My web application is going to be a ecommerce website and it will use the Algolia/Swiftype API, Stripe API and Google Maps. The website will also have 2 types of user accounts.
Just a couple of questions:
1) If I use Firebase, do I still need to use MySQL?
2) Do I need to design the Firebase database?
3) Will using Firebase speed up development time?
4) If I use Firebase, do I still need to use AWS or Rackspace?
Thanks.
No you don't need MySQL if you are using Firebase. But, there are good reasons to use one or the other, or both together. They are very different in how they work and you need to evaluate them independently for your use cases.
Not necessarily, because Firebase is "schema-less", meaning it is based entirely on the JSON data you put into it. In essence, it's a massive JSON object you put data into. (But, I'm not saying you don't need a little planning to make things work right, I'm merely saying you don't need to plan all your data types, columns, etc.)
Maybe, maybe not. It depends on how familiar you are with JSON, working with schema-less data, and working with restful services. I would argue that it all depends on what you're trying to accomplish, and how complex your system is, as to whether it will speed things up or not.
No (but maybe yes). Are you building a Node application? If you're building in Node then you can do everything through Firebase (they can host it for you). If you are delivering the first byte in something else (like PHP), then you would need a different host like AWS or Rackspace. But, you'd always have Firebase hosting your data.
Hope those answers help! Please comment under this answer if you need any clarification.

Real time activity feed - code / platform implementation?

I am defining out specs for a live activity feed on my website. I have the backend of the data model done but the open area is the actual code development where my development team is lost on the best way to make the feeds work. Is this purely done by writing custom code or do we need to use existing frameworks to make the feeds work in real time? Some suggestions thrown to me were to use reverse AJAX for this. Some one mentioned having the client poll the server every x seconds but i dont like this because it is unwanted server traffic if there are no updates. I was also mentioned a push engine like light streamer to push from server to browser.
So in the end: What is the way to go? Is it code related, purely pushing SQL quires, using frameworks, using platforms, etc.
My platform is written in PHP codeignitor and DB is MySQL.
The activity stream will have lots of activities. There are 42 components on the social networking I am developing, each component has approx 30ish unique activities that can be streamed.
Check out http://www.stream-hub.com/
I have been using superfeedr.com with Rails and I can tell you it works really well. Here are a few facts about it:
Pros
Julien, the lead developer is very helpful when you encounter a problem.
Immediate push of new feed entries which support PubSubHubHub.
JSon response which is perfect for parsing whoever you'd like.
Retrieve API in case the update callback fails and you need to retrieve the latest entries for a given feed.
Cons
Documentation is not up to the standards I would like, so you'll likely end up searching the web to find obscure implementation details.
You can't control how often superfeedr fetches each feed, they user a secret algorithm to determine that.
The web interface allows you to manage your feeds but becomes difficult to use when you subscribe to a loot of them
Subscription verification mechanism works synchronous so you need to make sure the object URL is ready for the superfeedr callback to hit it (they do provide an async option which does not seem to work well).
Overall I would recommend superfeedr as a good solution for what you need.

Integrate Dropbox into my website

I've done some googling around on this topic, but there seems to be only one option: the Dropbox official API. Is there no other way i could do some sort of JSON/PHP get_file_contents etc, when you get tweets from twitter you can use the user_timeline, is there no alternative for Dropbox people have come across. I just want something i can put a username and password into the PHP script and have it get the files (or am i dreaming and will have to use the API)
Check out the Dropbox PHP SDK it uses OAuth for validation which is the safest way.
You're dreaming and will have to use the API. This is exactly what API's are for, for programming applications to talk to applications. Specifically on the subject of authentication, there would be so many security issues with just having a user/pass in your code it's not even funny. Things like OAuth and other API authentication methods exist to make this kind of thing safer and saner. Sort of like lighting a campfire in a firepit instead of the middle of a dry grassland.
There are libraries like the one fire mentions that can wrap the API and make it easier to access from your language, but you need to play by the rulebook here. I know it sounds daunting but your application will be the better for doing it right.
You could also use the hosting service KISSR which would allow you to host your entire site out of Dropbox. This would be simpler than using the API but you wouldn't be able to use PHP.
it is not that much of a odd question that has been asked. as if you are using two hosting services one of them for just hosting images the other is for interaction events, done gazillions of time, some servers use term 'content/image leeching', hard to differenciate legit useage. however thats what consumer is asking/requesting, funny answers

Real time location tracking - windows program or browser based?

I want to track a few hundred, maybe a few thousand people in real time.
Let's say that the hardware aspects are sorted out and I can get the data into a database.
Now, I want to get it out and show it, in real-time.
Weeeell ... "real-enough" time. Let's say that I want to draw a floorplan of a building and plot everyone every 1 to 5 seconds.
(I might want to show only certain "kinds" of people at the click of a button; I will need datamining, etc, but let's stick with the worse case scenario).
I am comfortable enough with PHP, though not this sort of thing. I personally would be happier with a windows app coded in Delphi, but the trend seems to be to make everything browser based.
So, the question, I guess is whether a browser can handle this and whether there are compelling arguments for a windows-based or browser-based solution.
If browser-based can handle this (displaying a few thousand data-points a second), and there are no overwhelming arguments for windows then I guess I will go for browser-based and learn a few new tricks. The obvious advantage being that I could also re-use a large part of my code for (vehicle) tracking on Google maps.
Most of your work will probably be done in your spatially enabled relational database. For example, PostGIS can select data points within a bounding box or more sophisticated spatial predicates (ST_Contains, ST_Crosses, ST_Intersects, ST_Touches, ...) as well as the usual SQL joins and WHERE conditions. Spatial selects should use a spatial index to speed things up.
If this is the case, your app will largely be a presentation layer. In this case, use whatever will be easiest for you. The advantage of browser-based is that it is cross-platform client-server by default, but this might not matter to you.
With respect to render speed, it really depends on how you are planning to render your map. There are speed tests available for Google Maps. However, I suspect that if you are planning on a google maps type interface several thousand points are going to turn into a blur of pins. Do you have an interface mockup?
If you'd be happier with one type of app versus another, then write that type of app. Don't make something a browser app just to make it a browser app.
First you should understand what is the target of your app (and its size, how many concurrent clients?), and then decide if a fat client or a thin/web one suits it best. Then you should check which kind of application is able to manage the load you forecast. Could you display a few thousand datapoint every second or so with the technology you master or can in your timeframe? Would multithreading help you to exploit current multicore processors to achieve your result? Which technology will let you take advantage of it?
Maybe seems a bit old hat, but if you do decide to go browser based, you could pre-render the points to an image and just show the image?
WebSockets
Take a look at HTML5 WebSockets, they are a new standard for server/browser data exchange:
WebSockets is a technology providing
for bi-directional, full-duplex
communications channels, over a single
Transmission Control Protocol (TCP)
socket, designed to be implemented in
web browsers and web servers.
The server can push new data to the client when it becomes available, removing the overhead of client pull requests.
The Wikipedia page lists available server-side implementations, including PHP versions (but not Delphi).
WebSockets are not bound to JavaScript, the websockets.org page says:
In addition, the Web Socket protocol
can be used to support a diverse set
of clients (e.g. JavaScript, Adobe
Flex, JavaFX, Microsoft Silverlight,
etc.). However, the HTML5
specification only defines support for
JavaScript, which is limited to
text-based protocols. To serve other
client-types and support binary
protocols you will need to look to
external offerings.
Message data can be exchanged in JSON format, which is supported by JavaScript and also available for Delphi (as open source implementations like SuperObject or lkJSON).
Ajax
Ajax based rich internet applications for Delphi can be built using Intraweb or ExtPascal. ExtPascal is an Object Pascal (Delphi, FreePascal/Lazarus) wrapper/binding for Ext JS, a complete GUI Ajax framework and offers transparent support for all main web browsers: IE 6+, Firefox 1.5+, Safari 3+, Opera 9+ and Chrome 2+ on any client side platform (PCs, SmartPhones, iPhone, PDAs, etc). Online demo applications: FishFacts, more.
Ajax Push (aka Reverse Ajax / Comet) offers "HTTP server push" of data (in XML or JSON format) which transfers data from the server to all connected web browser clients whenever data on the server changes. Clients can 'subscribe' to the information they are interested in.

integrating php mysql and voip and text to speech

Im looking for a starting point of writing an application that will allow a php/mysql program to interact with a VOIP caller(s).
The idea is caller calls into a number, and that number reads text output from php/mysql based on menu options on the call.
Where do i start with this project? Specifically, getting the voip to interact with the php.
www.voicePHP.com
You might want to look into Twilio's service too. Language-agnostic, simple REST API, reasonable pay-per-minute cost, very robust and scalable. There are some examples in the documentation that get you started towards doing what you want.

Categories