Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have to record whatever user listening through headphones. Say for example, user listening song, talking to someone (in call) etc. Without headphones I was able to record but with headphones I ran out of luck. I tried this link with all possible Audiosource and MediaRecorder but did not get expected result. So, help or any clue is greatly appreciated.
Edit : I thought to record headphone output but seems its not possible by Michael's answer. So, my requirement is as above. Any suggestion or clue about how can I achieve this is greatly appreciated. Thanks.
There's no support in Android for recording output streams. There might be phones that support it in some fashion, but that'll be completely vendor specific and not something you can expect to work on any Android device.
Voice call recording is a special case, because voice call audio aren't regular streams that are managed by applications. Many Android devices support recording of both the voice call uplink and downlink using the VOICE_CALL/VOICE_DOWNLINK/VOICE_UPLINK audio sources.
When you say that you were able to record the playback without headphones, what I suspect actually happened was that the microphone picked up what was coming out of the loudspeaker, rather than some form of internal recording of output streams. Recording the loudpeaker output through the primary microphone is certainly one way of doing it, but the resulting recording is probably going to sound really bad.
I usually just hook up my Android phone to a rig I originally made to record PlayStation 1 audio, into my computer.
Stereo RCA cable terminating in dual female ends on each side ( 3 bucks ) combined with two stereo adapters that take the signal from two female RCA plugs, into a single standard headphone jack.
Attach, place one of the now standard male stereo headphone plugs into phone, the other into the audio mic input of your computer.
Fire up program like WireTap or similar
Adjust settings so you can hear the received audio coming in through your streaming phone, and press the record button.
It may not be FLAC quality - but good enough.
Total cost of equipment ( not including phone or computer): About 15 bucks.
Related
Can I use Java to control the audio input level of a microphone, so that I can change the audio input level in the Operation System. If yes, how?
Yes and no, that all entirely depends on 2 things -
The tools the microphone software has
The compatibility of the resulting edit to the type you are expecting (more on this in a bit...)
Let's start with some definitions first. The term you are looking for here is Compression
Compression is basically the pre formatting of your microphone, in this case, turning the input volume down all the way so that the loud sounds don't drown out your quiet ones. Compression is used by many musicians who are about to record a loud solo or plan to record a very quiet ambience. This is what you will be using to solve your problem.
Now, we will need to know more about your microphone before I can help you anymore on this point. Please comment in the comment section of this answer which microphone SPECIFICALLY you will be recording from. I will edit my answer as you give more info.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I want to make a video transcoder as a holiday project in Java. I was looking into the basics of video files and came across terms like containers, bit rate, bit depth and so on.
I have questions regarding bitrate.
I know bitrate is the amount of data that is contained in the video per second. Sound also has a bit rate but is considerably lower than that of video, obviously.
So, say there is a video that is of 8 Mbps (YouTube HD 720p) and the user wants to transcode it to a lower bitrate of 4 Mbps.
Will this cause the sound to go out of sync?
I am not doing the transcoding myself, I am using Xuggler for it which contains a lot of codecs like H264 and others.
Also, if, by an accident the user decides to convert a 4 Mbps video to a 8 Mbps video, what will happen ?
This situation is possible if the user gives a video captured from a phone camera and decides to store it in DVD quality.
Also, there are other things to take into consideration like frame rate right ? Because a low capacity device can not handle a higher frame rate. is frame rate related to bit rate?
There are several possibilities of what will happen, depending on the decoder and so on. I'm not familiar with Xuggler, but:
The sound should not go out of sync if you drop video bitrate with a proper software. It will not shorten the video or anything like that. Depending on what you do to it, either the frame-rate will drop ( it will discard every 2nd frame) or each frame will be more compressed.
The audio and video are generally independent, so changing the bitrate of one will not affect the other. In the case of changing to a higher bitrate, the transcoder will either throw an error, or produce a larger file at the same quality as the original.
The frame rate is not directly related. The bit rate is just a measure of how many bits are being used to encode one second of audio or video.
Is it possible to retrieve the characteristics of the audio output signal dedicated to headphones during audio playback? I don't want to record the signal per se (that is, I don't want to record the radio with a tape player to make an 80s style mixtape), but instead I only want to know the strength, in decibels, of the signal for medical research purposes.
I was thinking this could maybe be accomplished in the same manner a visualizer does?
If you're writing an Android app, I think you're looking for the AudioManager, through which you can query the volume of the different audio streams.
Calling getStreamVolume should get you the data you want.
I was playing with a karaoke application on iPhone and came up with following questions:
The application allowed its users to control the volume of the artist; even mute it. How is this possible?
Does adjusting artist sound/setting equalizer etc. mean performing some transformation of required frequencies? What sort of mathematics is required here(frequency domain transformations)?
The application recorded users voice input via a mic. Assuming that the sound is recorded in some format, the application was able to mix the recording with the karaoke track(with artists voice muted). How can this be done?
Did they play both the track and voice recording simultaneously? Or maybe they inserted additional frequency(channel?) in the original track, maybe replaced it?
What sort of DSP is involved here? Is this possible in Java, Objective C?
I am curious and if you have links to documents or books that can help me understand the mechanism here, please share.
Thanks.
I don't know that particular application, probably it has a voice track recorder separately.
For generic 2-channels stereo sound the easiest voice suppression can be performed assuming that artist's voice is somehow equally balanced between two channels (acoustically it appears in center). So the simplest 'DSP' would be subtract one channel from another. It does not work that well however with modern records since all instruments and voice are recorded separately and then mixed together (meaning that voice will not be necessarily in phase between two channels).
I have written two detailed blogposts on how to get a custom EQ in iOS. But i have no details about how to do the DSP yourself. If you simply want to choose between a wide range of effects and stuff, try this.
First post explains how you build libsox:
http://uberblo.gs/2011/04/iosiphoneos-equalizer-with-libsox-making-it-a-framework
The second explains how to use it:
http://uberblo.gs/2011/04/iosiphoneos-equalizer-with-libsox-doing-effects
please up the answer if it helped you! thanks!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Now that the oligopole of market data providers successfully killed OpenQuant, does any alternative to proprietary and expensive subscriptions for realtime market data subsist?
Ideally I would like to be able to monitor tick by tick securities from the NYSE, NASDAQ and AMEX (about 6000 symbols).
Most vendors put a limit of 500 symbols watchable at the same time, this is unacceptable to me, even if one can imagine a rotation among the 500 symbols ie. making windows of 5 sec. of effective observation out of each minute for every symbol.
Currently I'm doing this by a Java thread pool calling Google Finance, but this is unsatisfactory for several reasons, one being that Google doesn't return the volume traded, but the main one being that Google promptly is killing bots attempting to take advantage of this service ;-)
Any hint much appreciated,
Cheers
I think you'll find all you need to know by looking at this question: source of historical stock data
I don't know of any free data feeds other than Yahoo!, but it doesn't offer tick-by-tick data, it only offers 1 minute intervals with a 15 minute delay. If you want to use an already existing tool to download the historical data, then I would recommend EclipseTrader. It only saves the Open, Close, High, Low, and Volume.
(source: divbyzero.com)
You can write your own data scraper with very little effort. I've written an article on downloading real-time data from yahoo on my blog, but it's in C#. If you're familiar with C# then you'll be able to translate the action in Java pretty quickly. If you write your own data scraper then you can get pretty much ANYTHING that Yahoo! shows on their web site: Bid, Ask, Dividend Share, Earnings Share, Day's High, Day's Low, etc, etc, etc.
If you don't know C# then don't worry, it's REALLY simple: Yahoo allows you to download CSV files with quotes just by modifying a URL. You can find out everything about the URL and the tags that are used on yahoo here: http://www.gummy-stuff.org/Yahoo-data.htm
Here are the basic steps you need to follow:
Construct a URL for the symbol or multiple symbols of your choice.
Add the tags which you're interested in downloading (Open, Close, Volume, Beta, 52 week high, etc, etc.).
Create a URLConnection with the URL you just constructed.
Use a BufferedReader to read the CSV file that is returned from the connection stream.
Your CSV will have the following format:
Each row is a different symbol.
Each column is a different tag.
Open a TDAmeritrade account and you will have free access to ThinkOrSwim real time trading and quotes platform. Live trading is real time and paper trading is delayed 15 minutes. I forget what the minimum required is to open a TDAmeritrade account but you can go to TDAMeritrade.com or thinkorswim.com to check them out.
Intrinio has a bunch of feeds with free and paid tiers. Essentially you only have to pay for what you need as opposed to the bigger data suppliers. Intrinio focuses on data quality and caters to developers as well, so I think it'd be a great option for you.
full disclosure - I work at Intrinio as a developer
There's a handy function in Google Sheets (ImportHTML) which I've been using for a while to reasonable effect.
For example -
=ImportHTML("http://www.bloomberg.com/markets/commodities/futures/metals/","table",1),5,3) returns the EUR Gold spot price.
It works with Yahoo too, so =Index(ImportHTML("http://finance.yahoo.com/q?s=DX-Y.NYB","table",0),2,2) returns the DXY.
The data updates with some small delay but it's usable.