I have an application that so far recognizes some notes and I need to play them, but I need them in different duration.
I was thinking of having some mp3s with the notes, but I haven't found a way to play them a specific duration.
Can you help me with a solution for this issue?
You can use Timer Task for this work. It executes your code for specific limit of time.
Related
Currently having internal tests on the applications and it takes about 1-2Hrs for it to reflect on the playstore, is this normal behaviour or am i doing something wrong, or missing something thing, does google mean 2 hrs by "immediate" ?
yes.it will take more than one hour to reflect those changes in playstore.it is the normal process.
Internal testing track should make the download available within 1-2 minutes. On open and closed tracks it will take a couple of hours. Make sure you are using the right type of track: https://support.google.com/googleplay/android-developer/answer/3131213?hl=en
I have music that i can find using the text search api but I can't get it to be identified using the musicId-stream api . I have even tried to use the sample application to identify the song playing but just doesn't find it using the music-id functionality. Using the text search , i can find the song no problem.I have noticed also that in most of those cases, after 2 week or 3 weeks, I am able to identified the song. I have come across similar situation many times and I was wondering if it is an expected scenario and if that is the case, what is the expected time delay?
Thanks
Not all the songs available through a text search are available with music-id simply because we do not have the fingerprints for all the songs that are in our music database.
There is no general rules about how fast things are available in the music-id database. Most of the times we are able to ingest the tracks even before the song is officially released. It depends on how fast the labels are submitting those tracks to us. The range is around one month before and one month after the track is released to public. But there are more constraints influencing track ingestion, for example, charts, trends, popularity and more. Sometimes for some reasons we do not get the tracks directly and have to acquire them. And then there is the ingestion queue we have. We are ingesting tens of thousands of tracks per week.
Now if you feel that a track is missing that really should be in there, you can alsways make a query and contact us through our support page : https://www.gracenote.com/support/
For my application I need to play multiple tracks simultaneously and some kinf of listener to know when a track is finished.
SoundPool seems to be the obvious choice, but unfortunately I could't find a solution to get notified when a track ends.
I also thought about using multiple instances of Android's MediaPlayer, but I'm afraid of getting performance issues.
Are there any other options?
If you use MediaPlayer, you can use OnCompletionListener. It also has no problem of playing multiple tracks at the same time. Like gian1200 says. Try it, perhaps the performance is not really an issue.
I googled around and found the regular speech-api from google. But I think this isn't what I need. I need continious voice recognition and the ability to launch other actions when a specific word is spoken. Is there anything in the android sdk that I can use?
If not: Is it possible to implement third-party libraries? (If yes: which - and what do I have to think about when implement a third-party-library?)
Edit: I thought about this again. I have to recognize just one 'word' (that probably won't be in googles-speech-databases). I have the chance to record it. That means, I'm able to continiously match the incoming audio-stream against my recording. That should work without a database. But I'm new to android-development. Do you have suggestions for APIs to use for recording and matching the recorded? Or is there any better way to continiously wait for a specifig 'word' to occur and then process any further actions?
btw: if that wasn't clear described: the app should continue to record and watch for the word to occure again when the reaction is done.
Is there anything in the android sdk that I can use?
No, sorry.
I'm re-inventing the wheel here, but as I'm a beginner programmer I'm curious as to the best way to do this...
As part of an Android app, I'm developing a very simple media player. It plays the file, and I want a m:s timer, so the user can see how far into the file they are (e.g. "04:56").
I'm probably missing the obvious, but what's the best way to do this?
One way would be to generate a new thread which sleeps for 1000ms, then calls MediaPlayer.getCurrentPosition() and updates the UI. However, this seems slightly ridiculous - my thread isn't guaranteed to come back every second, so I'm going to be displaying an inaccurate time. There must be a better way of doing this?
Educate me (or link for me).
Just use Handler#postDelayed() or View#postDelayed() to do your once-a-second updates. This saves you from having to fork a thread, let alone clean up after it.
Here is a project using that specific technique for your desired purpose: updating a time counter based on MediaPlayer progress.
One alternative might be to start an independent timer when the music starts. Have it "sync" by calling MediaPlayer.getCurrentPosition() once every five seconds or so to ensure that the time remains accurate.