I have a simple frequency modulation scheme where in I am sending simple textual data by encoding it into specific frequencies(for example 'a' is converted to ASCII value of 97 and I use 10 frequencies to map decimal values from 0-9. 17 khz for 0,17.2 for 1,17.4 for 2 and so on.) A sound file is created by encoding such data, and when I playback the tone, I have a decoder on my phone which decodes that data. Currently each tone has a duration of 500 ms and the phone can get the data even from 10 m from the speaker with 100% accuracy. When I try to reduce the duration to 250 ms in order to increase the speed, I find that the accuracy decreases drastically for distances >2 m. Does this imply that if I increase the duration, there will be increase in operating distance?
It is very hard to give a single, correct answer because there are so many variables involved. Some things to keep in mind:
The main variable that determines the number of errors in the receiver is the ratio of energy per digit and the noise (this is the signal to noise ratio, or SNR). When you decrease the pulse duration, you reduce its energy and in consequence reduce the SNR. Increasing the pulse duration will increase the SNR and will allow you to increase the distance, all else equal.
Received power decreases with the square of the distance; for relatively large distances, this will dominate the SNR.
The technique you are using is called frequency shift keying (FSK). It is easy to implement but requires large bandwidth. Your audio setup has limited bandwidth (20 kHz in the most optimistic case). Reducing the pulse duration increases the bandwidth; at some point, your speaker/microphone combination will not have the bandwidth to properly reproduce and detect your signal.
Bandwidth considerations also suggest that you should shift your frequencies to around 10 kHz: at 17 kHz, you will soon hit the system's limit of 20 kHz. Operating at 10 kHz, you have 10 kHz of bandwidth to either side of your carrier.
In a typical indoor office or room, one big problem with this technique might be from multi-path interference. e.g. reflections off nearby walls and other hard surfaces will nearly cancel out the direct high-frequency audio. Thus the very long tone times required to detect a nearly cancelled-out audio signal.
A better solution might be to use multiple tone frequencies (either simultaneous or sequential) for each symbol for some redundancy. With an appropriate frequency set selection, you can reduce the odds that any given reflection will arrive 180 degrees out of phase with the direct path at all frequencies.