Summary of the invention
The purpose of this invention is to provide a kind of method that driver test system uses oscillogram assessment mobile wireless network voice quality, this method adopts speech waveform figure to replenish as the strong of above two kinds of assessment modes, it shows through handling speech data in patterned mode, the support of existing objective voice data has visual intuitive again, and it can play voice limit drawing waveforms in conjunction with the subjective evaluation limit; Also can adopt the mode of objective evaluation, the waveform of the speech data of the speech data of drafting transmission and reception compares observation respectively, can also superpose to the speech waveform that sends and receive simultaneously and draw and the difference drafting, the voice quality of transmitting in the network is carried out patterned assessment.
Oscillogram of the present invention has two kinds, and a kind of is time domain waveform figure, and another kind is frequency-domain waveform figure.Time domain waveform does not have the frequecy characteristic of voice, and frequency-domain waveform does not have the time dependent relation of voice, so adopt these two kinds of oscillograms could comprehensively reflect the attenuation of the voice that transmit in the wireless network simultaneously.
The voice that driver test system is initiated wireless network by graphical user interface module are dialed and are answered, the speech data that voice quality waveform appraisal module is used to assess from the testing mobile phone acquisition, at transmitting terminal, testing mobile phone transfers the signal of telecommunication to by the voice of dialing that microphone will receive, use A/D (analog to digital) transducer to be converted into discrete digitized sampling signal again, this signal is compressed to be encoded to and G.723 waits the form of speech coding agreement defined to transmit by wireless network, driver test system obtains the VoP of dialing that testing mobile phone sends to wireless network by interface module, the VoP that sends is resolved the speech data that obtains after testing mobile phone is encoded through message resolution module, voice quality waveform appraisal module is with its decoding and be encapsulated as the WAV form, promptly carry out an audio format conversion, the voice data of the WAV form after the conversion is as the transmitting terminal initial data of speech quality evaluation, voice quality waveform appraisal module will send the drafting of speech waveform figure and the synchronous playing that sends voice according to these data, and graphical user interface module is finished the final demonstration of this oscillogram; At receiving terminal, testing mobile phone receives voice signal from wireless network, driver test system obtains the answer VoP of testing mobile phone from the wireless network reception by interface module, the process message resolution module is resolved the VoP that receives and is obtained speech data, voice quality waveform appraisal module is with its decoding and be encapsulated as the receiving terminal speech data of WAV form as speech quality evaluation, utilize these data to receive the synchronous playing that speech waveform figure draws and receives voice, graphical user interface module is finished the final demonstration of this oscillogram.The benefit of doing like this is to decode at the speech data that transmitting terminal and receiving terminal are all crossed lossy compression method to be converted to same form and can to offset the loss that speech data takes place through encoding and decoding, thereby reflects the loss situation of wireless network transmissions to voice signal more realistically.
Time domain waveform is simple relatively and directly perceived, the drafting of oscillogram is a starting point with the speech data of WAV form, from wav file, read each sampling number certificate of voice according to file header information, with the transverse axis is time shaft, is that the amplitude (sampled point numerical value) of voice signal is drawn reception/transmission time domain waveform figure with the longitudinal axis.Receiving time domain waveform figure is the same with transmission time domain waveform drawing drawing method, draws reception time domain waveform figure and is as the criterion to receive speech data, draws transmission time domain waveform figure and is as the criterion to send speech data.Below just only be referred to as the drafting of time domain waveform figure.
The waveform of time domain is drawn can be had static and dynamic two kinds, the static transverse axis length that is about to oscillogram of drawing is fixed, no matter all speech datas that air time length collected in all just whole air time are drawn in proper order by the time order and function of sampled point, long data is just many more more air time so, the drafting of whole data will be compressed severely more on time shaft, so just can't accurately observe the time dependent details of voice of each sampled point, but this static oscillogram can provide the time dependent whole understanding of the voice in the whole air time, what is more important can contrast the static voice oscillogram that sends and receive, observe primary speech signal and through the difference degree tendency over time between the signal of decaying after the wireless network transmissions, this time dependent difference degree can represent that a kind of is transmission/reception different wave shape figure with other two kinds of static oscillograms; A kind of is transmission/reception waveform overlay chart.Transmission/reception different wave shape figure is that the voice signal with the transmission/reception of the sampled point of identical time subtracts each other, and gets its absolute value and draws by the time sequencing of sampled point.Transmission/reception waveform overlay chart is the computing that seeks common ground of the voice signal with the transmission/reception of the sampled point of identical time, promptly gets smaller value, draws in chronological order again.
Dynamically time domain waveform figure can represent the time dependent details of voice signal of each sampled point more meticulously, the synchronous mode of employing of the present invention and speech play is drawn dynamic waveform figure, draw and freely to select blanking time, improve the time dependent careful degree of waveform if desired, then can reduce blanking time, otherwise then can strengthen blanking time.Specific practice is to preestablish one to draw blanking time, in the speech data of playing transmission/reception, draw drafting at interval once every one, each just draw that should all interior sampled points of the time interval be transverse axis with the time shaft to be the longitudinal axis with the amplitude of voice signal be depicted as oscillogram by the sequencing of time, in playing process, also can stop at any time so that check a certain static in short-term oscillogram.
Frequency-domain waveform figure mainly is the frequency domain character that is used for representing voice.It is drawn also is that speech data with the WAV form is a starting point.For analysis the present invention of frequency domain character adopt rich in the leaf analysis method, because speech wave is a non-stationary process, therefore be applicable to the cycle, the standard Fourier transform of transition or stationary random signal can not be used for the direct representation voice signal, voice signal is a time varying signal, so its frequency spectrum is time dependent, because voice signal changes very slow in time, thereby (one period short time is set between the 10-30 millisecond in one period short time, voice signal is called a frame in each short time period) can think that its frequency spectrum is changeless, can analyze the frequency spectrum of voice signal with Short Time Fourier Transform, corresponding frequency spectrum is called " short-time spectrum ".Voice signal x to the n frame
n(m) carry out Fourier transform, can get short time discrete Fourier transform, it is defined as follows:
Wherein, n represents the sequence number of speech frame, and N represents window width, i.e. voice signal sampled point quantity in each frame, and m represents each sampled point in the frame;
By definition as can be known, Short Time Fourier Transform is actual to be exactly the standard Fourier transform that window selects voice signal.At this moment, window W (n-m) is " slip " window, and it slides along sequence x (m) with the variation of n.Because window is finite length, satisfy definitely can and condition, so this conversion exists.The present invention does not use Hamming window commonly used (because this window function contains cos operation) in the voice in order to reduce complexity of calculation, and has adopted simple rectangular window, and this window function is defined as follows:
Wherein, n represents the sequence number of speech sample point in the frame, and N represents window width;
With discrete Fourier transform and continuously rich in the relation of leaf transformation the same, make angular frequency=2 π k/N, then must disperse rich in short-term in leaf transformation (DFT), it is actually X
n(e
J ω) in the sampling of frequency domain, as follows:
Leaf transformation (FFT) algorithm was finished x in the present invention adopted and wins fast efficiently
n(m) to X
n(k) conversion, at this moment the long N of window must be 2 integral multiple 2L (L is an integer), and according to the character of Fourier transform, the frequency spectrum of the Fourier transform of sequence of real numbers has symmetry, and therefore, it is N/2+1 X that whole spectrum informations are included in length
n(k) lining, in addition, in order to make X
n(k) have higher frequency resolution, DFT that is got and corresponding FFT points N 1 should be abundant, but x
n(m) length N will be subjected to the restriction of sample rate and short-time characteristic, for example, is 8kHz and frame length when being 20ms in common sample rate, N=160.And N1 generally gets 256,512 or 1024, for x
nCounting (m) enlarges power N1 from N, with adopting the way of benefit 0, add several 0 sampling values in the part that enlarges, and then the sequence of adding after 0 is carried out FFT, result after the conversion and the conjugate complex number of self multiplied each other obtains power spectrum, and its extraction of square root has just been obtained amplitude spectrum.With the abscissa is frequency, ordinate is that amplitude is drawn this amplitude spectrum and just obtained a static in short-term reception/transmission frequency-domain waveform figure, along with a plurality of short-term spectrum waveforms are drawn in the broadcast of voice continuously, just obtained the dynamic frequency-domain waveform figure of conversion in time, in playing process, also can stop at any time so that check the short-term spectrum of a certain frame.The frequency-domain waveform figure of the voice signal by paired observation transmission/reception can find the influence of wireless network to the frequency domain character of voice signal, the influence of frequency domain character is directly connected to the quality of voice.
The present invention adopts speech waveform figure to replenish as the strong of existing two kinds of assessment modes, speech data is shown in patterned mode through handling, the support of existing objective voice data has visual intuitive again, and it can play voice limit drawing waveforms in conjunction with the subjective evaluation limit; Also can adopt the mode of objective evaluation, the waveform of the speech data of the speech data of drafting transmission and reception compares observation respectively, can also superpose simultaneously and draw and the difference drafting, realize visual to the speech quality evaluation that transmits in the wireless network the speech waveform that sends and receive.
Embodiment
The present invention is described in detail below in conjunction with accompanying drawing.
Fig. 1 is a voice quality waveform appraisal structure chart.The voice quality waveform appraisal of driver test system comprises: testing mobile phone 101, interface module 102, message resolution module 103, voice quality waveform appraisal module 104, graphical user interface module 105, a interface 106, b interface 107, c interface 108, d interface 109, e interface 110 and f interface 111.Can initiate the voice of mobile phone by the graphical user interface module user and dial and answer business, dialing and answer order will be handed down to interface module 102 by e interface 110, and interface module 102 sends order by f interface 111 again makes its execution dial and answer business to testing mobile phone.Testing mobile phone 101 reports signaling message by a interface 106,102 pairs of interface modules are received that signaling message is classified and are unpacked, message content is reported message resolution module 103 by b interface 107, message resolution module 103 can be resolved the byte stream of message, the data field value of message is saved in the corresponding message structure, the present invention will obtain the VoP that sends to wireless network and receive from wireless network from message resolution module 103, and VoP is matched to tackle many to the mobile phone requirements of concurrent test simultaneously by the deamplification after primary signal and the transmission, speech data finally saves as data file in this module and waits until and follow-uply carry out quality evaluation and handle.Voice quality waveform appraisal module 104 reads the voice data file of step preservation, speech data is at first decoded, add that then suitable header is packaged into the speech data of WAV form, again the speech data after the conversion is carried out analyzing and processing and be depicted as various types of speech waveform figure, also be responsible for the broadcast of voice simultaneously, these oscillograms are given graphical user interface module 105 by d interface 109 and are finished final demonstration at last.
Fig. 2 is voice quality waveform appraisal modular structure figure.Voice quality waveform appraisal module is at first by phonetic matrix conversion 201, read the voice data file of transmission/reception, the coded format of identification voice, according to the different coded formats extraction speech data of decoding, then speech data is added that header re-assemblies and be the voice data file of WAV form input data as speech quality evaluation; The voice data file of WAV form is read in wav file parsing 202, resolves the wav file header, obtains audio sampling data simultaneously; The static waveform Figure 20 3 of transmission voice time domain reads the speech data that sends to wireless network it is depicted as the static oscillogram of time domain.Send voice time domain dynamic waveform Figure 20 4 and read the speech data that sends to wireless network, it is depicted as time domain dynamic waveform figure by designated time intervals; The speech data that the static waveform Figure 20 5 of reception voice time domain reads the wireless network that receives is depicted as the static oscillogram of time domain with it.Receive the speech data that voice time domain dynamic waveform Figure 20 6 reads the wireless network that receives, it is depicted as time domain dynamic waveform figure by designated time intervals.Time domain waveform disparity map 207 will send to the speech data of wireless network and do difference operation through the decay speech data that receives after the wireless network transmissions, be depicted as the different wave shape figure of time domain.Time domain waveform overlay chart 208 will send to the speech data of wireless network and through the decay speech data that receives after the wireless network transmissions computing that seeks common ground, be depicted as the waveform overlay chart of time domain.Send voice spectrum Figure 20 9 and read the speech data that sends to wireless network, use rectangular window function to intercept the Short Time Speech data piecemeal, the length of window is obtained by the sample rate and the default frame duration of speech data, and its end is mended 0 expand to 2 integral multiple, use fast Fourier transform to obtain amplitude spectrum then, draw out the spectrogram that sends voice.Receive voice spectrum Figure 21 0 and read the speech data that receives from wireless network, use rectangular window function to intercept the Short Time Speech data piecemeal, the length of window is obtained by the sample rate and the default frame duration of speech data, and its end is mended 0 expand to 2 integral multiple, use fast Fourier transform to obtain amplitude spectrum then, draw out the spectrogram that receives voice.The synchronous playing of the voice that speech play 211 sends or receives when drawing dynamic waveform figure is used for the drive test personnel and carries out subjective speech quality assessment.
Fig. 3 is that time domain waveform is drawn flow chart.Voice data file 301 that sends and the voice data file 302 that receives are raw tone coded files that testing mobile phone sends and receives through wireless network.Voice data file 301 that sends and the voice data file 302 that receives are carried out audio format conversion 303, judge the coded format of voice document, call corresponding decoding algorithm it is decoded, more decoded speech sample data are added that the header of WAV form is encapsulated as the WAV formatted file of standard.Step 304 reads the audio file of the WAV form after the conversion, and step 305 is resolved the header of wav file, and step 306 reads each sampling number certificate of audio frequency according to the header of wav file; Just the drafting of time domain waveform figure can have been carried out according to WAV header and speech data, step 307 is drawn the static oscillogram that sends data, it is drawn the whole speech data that sends to wireless network in once conversing, be transverse axis with time during drafting, with amplitude (sampled point numerical value) is that the longitudinal axis is drawn, the length of the transverse axis and the longitudinal axis is maintained fixed, the account form of the abscissa of each sampled point is: the merchant of gained be multiply by total number of pixels of transverse axis again divided by total number of sample points in the position of current sampling point in the sampled point sequence of voice data.The account form of the ordinate of each sampled point is: the sampled point range value multiply by the merchant of gained total number of pixels of the longitudinal axis again divided by the amplitude peak value of all sampled points.Step 308 is consistent with 307 processing mode, only the speech data that receives is drawn.Step 309 is subtracted each other the voice signal of the transmission/reception of the sampled point of identical time, gets its absolute value and draws in chronological order, and the account form of horizontal ordinate is consistent with the static oscillogram of transmission.Step 310 will send to the speech data of wireless network and through the decay speech data that receives after the wireless network transmissions computing that seeks common ground, be depicted as the waveform overlay chart of time domain, and the account form of horizontal ordinate is consistent with the static oscillogram of transmission.In order to adjust the careful degree of drafting of moving time domain attitude oscillogram, need set in advance by step 311 and draw blanking time, the careful degree of this blanking time and drafting is inversely proportional to.Step 312 is drawn the time domain dynamic waveform figure that sends voice, its method for drafting and static oscillogram are similar, static oscillogram is that whole speech sample data are drawn and dynamic waveform figure draws the sampled point in blanking time, so at first calculate per second sampled point number according to the WAV header, how many sampled points obtain thus has again in blanking time, the account form of the abscissa of each sampled point is: the merchant of gained be multiply by total number of pixels of transverse axis again divided by the total number of sample points in the time interval in the position in the sampled point sequence of current sampling point in the time interval at its place.The account form of the ordinate of each sampled point is: the sampled point range value multiply by the merchant of gained total number of pixels of the longitudinal axis again divided by the amplitude peak value of all sampled points in the time interval.With a timer regularly, just draw once every a default blanking time, the whole speech data that is sent up to once conversing is all drawn to finish and is then stopped.Meanwhile, the transmission voice document that step 314 can synchronous playing WAV form carries out sense of hearing subjective evaluation.The time domain dynamic waveform figure that step 313 and 315 is finished the reception speech data draws and the voice document broadcast, and its mode is identical with transmission voice drafting mode.
Fig. 4 is that frequency-domain waveform is drawn flow chart.Step 401 is in full accord to step 306 flow process with the step 301 among Fig. 3 to step 406, because Fourier transform can only put on the Short Time Speech signal, so by the default speech frame length of step 407, generally this length is arranged between 10 to 30 milliseconds, generally gets 20 milliseconds.Step 408 is calculated the window length of rectangular window, and account form is that speech sample rate (obtaining from the WAV header) multiply by frame length; Step 409 and step 410 multiply by rectangular window function to the speech sample data sequence that sends and receive respectively, and intercepting the speech data sample piecemeal is the Short Time Speech data.Step 411 expands to 2 integral multiple by the mode of follow-up benefit 0 with the short time data sample that intercepts.Short Time Speech data after the step 412 pair expansion are carried out fast Fourier transform, and it is transformed into the power spectrum that frequency domain obtains voice from time domain, and the conjugate complex number with self on duty of each after the step 413 pair conversion extracts square root again, and power spectrum is converted to amplitude spectrum; Step 414 is depicted as frequency-domain waveform figure in short-term with amplitude spectrum, and its transverse axis is a frequency, and the longitudinal axis is an amplitude.Rectangular window begins to move to end from speech data in chronological order always, whenever moves and once just draws a width of cloth short-time spectrum.If the speech data end that rectangular window has moved to, promptly the short-time spectrum of whole speech data is whole draws the just end that finishes, otherwise forwards step 409 or step 410 continuation processing to.When drawing short-time spectrum piecemeal, can play the speech data that sends/receive by step 416/ step 417.
Above the invention has been described in conjunction with example, should point out, those skilled in the art can make the change on various forms of and the details, and do not depart from by the determined the spirit and scope of the present invention of claims.