A voice encoding/decoding apparatus for encoding inputted voice data and outputting said voice data as encoded data, while decoding inputted encoded data and outputting said encoded data as voice data comprising:
- a data buffer for holding voice data inputted and outputted through an I/O port and encoded data inputted and outputted through another I/O port;
- a voice encoding means receiving said voice data of one subframe from said data buffer to encode said voice data to obtain encoded data and outputting said encoded data of one subframe to said data buffer;
- a voice decoding means receiving said encoded data of one subframe from said data buffer to decode said encoded data to obtain voice data and outputting said voice data of one subframe to said data buffer;
- a frame synchronization detecting means for detecting a position of a synch bit attached to said encoded data held in said data buffer;
- a first clock generating means for providing timing of inputting and outputting said voice data to and from said data buffer;
- a second clock generating means for providing timing of inputting and outputting said encoded data to and from said data buffer;
- a word transfer information providing means for providing the number of words of said voice data to be inputted to and outputted from said data buffer, the number of words of said encoded data to be inputted to and outputted from said data buffer, information about a position of said voice data in said data buffer, and information about a position of said encoded data in said data buffer;
- and
- a control means for minimizing a time required from an inputting of said voice data to an outputting of said encoded data upon encoding said voice data of each subframe and a time required from an inputting of said encoded data to an outputting of said voice data upon decoding said encoded data of each subframe on the basis of said number of words of said voice data, said number of words of said encoded data, said information about a position of said voice data in said data buffer and said information about a position of said encoded data in said data buffer provided by said word transfer information providing means.