CN105094978B - Voice processing device and method - Google Patents

Voice processing device and method Download PDF

Info

Publication number
CN105094978B
CN105094978B CN201410205793.0A CN201410205793A CN105094978B CN 105094978 B CN105094978 B CN 105094978B CN 201410205793 A CN201410205793 A CN 201410205793A CN 105094978 B CN105094978 B CN 105094978B
Authority
CN
China
Prior art keywords
pcm
value
alaw
ulaw
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410205793.0A
Other languages
Chinese (zh)
Other versions
CN105094978A (en
Inventor
江玟君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Industrial edge intelligent Innovation Center Co.,Ltd.
Original Assignee
EVOC Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by EVOC Intelligent Technology Co Ltd filed Critical EVOC Intelligent Technology Co Ltd
Priority to CN201410205793.0A priority Critical patent/CN105094978B/en
Publication of CN105094978A publication Critical patent/CN105094978A/en
Application granted granted Critical
Publication of CN105094978B publication Critical patent/CN105094978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention relates to a voice processing device and a voice processing method. The device comprises an analog-digital conversion chip, a microprocessor and a driving module which are sequentially connected through a bus, wherein the microprocessor comprises a PCM data processing module, an ALAW and PCM conversion random storage module, an ULAW and PCM conversion random storage module and a transmission interface, the ALAW and PCM conversion random storage module and the ULAW and PCM conversion random storage module are respectively connected with the PCM data processing module, the transmission interface is respectively connected with the ALAW and PCM conversion random storage module and the ULAW and PCM conversion random storage module, the ALAW and PCM conversion random storage module is used for storing the corresponding relation between the value of the ALAW and the value of the PCM, the ULAW and PCM conversion random storage module is used for storing the corresponding relation between the value of the ULAW and the value of the PCM, and the data received by the transmission interface and the data received by the PCM data processing module are converted by calling the ALAW and PCM conversion random storage module or calling the ULAW and the. The occupation rate of the CPU is reduced, the load of the CPU is reduced, and the concurrent processing capacity of the voice processing device is improved.

Description

Voice processing device and method
Technical Field
The present invention relates to audio processing technologies, and in particular, to a speech processing apparatus and method.
Background
One of the important aspects affecting CPU (Central Processing Unit) occupancy in a conventional speech Processing apparatus is speech encoding and decoding, in which ALAW/ula (two compression algorithms under g.711 standard) and linear PCM (Pulse Code Modulation) are mutually converted, which occupies a large amount of CPU, resulting in limited call concurrency under the condition of the same hardware, whereas if CPU occupancy of speech encoding and decoding is decreased, the concurrency will be increased.
As shown in fig. 1, a conventional voice processing apparatus includes FXS (Foreign Exchange Station) and FXO (Foreign Exchange Office) chips, FPGA (Field Programmable Gate Array), PCI (Peripheral Component interconnect) bridge and PCIE driver connected in sequence via a bus, where the PCIE driver includes a voice codec unit, the voice processing apparatus transmits voice transmitted via a voice transmission network to the PCIE driver, the CPU calculates the voice codec unit to implement the interconversion between the raw data and the PCM code, one channel processes the interconversion between the raw data of 64KB per second, the number of channels is generally at least tens of channels, and the larger the amount of calculation of the CPU is, so that under the same hardware condition, a large amount of CPU is occupied by the voice codec unit, and the CPU has a large burden.
Disclosure of Invention
Therefore, it is necessary to provide a speech processing apparatus capable of reducing CPU occupancy and CPU load, in order to solve the problem that the CPU load is increased due to the large CPU occupation of the conventional speech processing apparatus by speech encoding and decoding.
In addition, it is necessary to provide a voice processing method capable of reducing the CPU occupancy rate and reducing the CPU load.
A voice processing device comprises an analog-digital conversion chip, a microprocessor and a driving module which are sequentially connected through a bus, wherein the microprocessor comprises a PCM data processing module, an ALAW and PCM conversion random storage module, an ULAW and PCM conversion random storage module and a transmission interface, the ALAW and PCM conversion random storage module and the ULAW and PCM conversion random storage module are respectively connected with the PCM data processing module, the transmission interface is respectively connected with the ALAW and PCM conversion random storage module and the ULAW and PCM conversion random storage module, the ALAW and PCM conversion random storage module is used for storing the corresponding relation between the value of the ALAW and the value of the PCM, the ULAW and PCM conversion random storage module is used for storing the corresponding relation between the value of the ULAW and the value of the PCM, and data received by the transmission interface and data received by the PCM data processing module are converted by calling the ALAW and PCM conversion random storage module or calling the ULAW and the PCM conversion random storage.
In one embodiment, the ALAW and PCM conversion random storage module comprises an ALAW and PCM conversion random storage submodule and a PCM and ALAW conversion random storage submodule, and the ALAW and PCM conversion random storage submodule is used for storing the corresponding relation of conversion of the value of ALAW into the value of PCM; the PCM and ALAW conversion random storage sub-module is used for storing the corresponding relation of the value of the PCM converted into the value of the ALAW; the ULAW and PCM conversion random access memory module comprises an ULAW and PCM conversion random access memory sub-module and a PCM and ULAW conversion random access memory sub-module, and the ULAW and PCM conversion random access memory sub-module is used for storing the corresponding relation of conversion of the value of the ULAW into the value of the PCM; and the PCM and ULAW conversion random storage sub-module is used for storing the corresponding relation of the value conversion of the PCM into the value of the ULAW.
In one embodiment, the stored mapping relationship between the value of ALAW and the value of PCM includes: storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ALAW value, and establishing a corresponding relation between the ALAW value and the address of the ROM;
the correspondence of the stored PCM value to the ALAW value includes: storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the PCM and the address of the ROM;
the correspondence of the stored value of the ULAW to the value of the PCM includes: storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM;
the correspondence of the stored PCM value to the ula w value includes: and storing the value of ULAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
In one embodiment, the microprocessor further comprises a conversion control module, wherein the conversion control module is respectively connected with the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module; the drive module is also used for storing a control variable and assigning a value to the control variable during drive initialization; the conversion control module is used for controlling and calling an ALAW and PCM conversion random access memory module or an ULAW and PCM conversion random access memory module according to the value of the control variable.
In one of the embodiments, the microprocessor is an FPGA, and the correspondence between the values of the ALAW and PCM and the correspondence between the values of the ULAW and PCM are stored in the form of coe files.
A method of speech processing comprising the steps of:
providing an analog-to-digital conversion chip, a microprocessor and a PCIE driving module which are sequentially connected through a bus, wherein the microprocessor comprises a PCM data processing module, an ALAW and PCM conversion random access memory module, an ULAW and PCM conversion random access memory module and a transmission interface, the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module are respectively connected with the PCM data processing module, and the transmission interface is respectively connected with the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module;
and converting the data received by the transmission interface and the data received by the PCM data processing module by calling the corresponding relation between the ALAW value and the PCM value pre-stored in the PCM conversion random storage module or calling the corresponding relation between the ULAW value and the ULAW value pre-stored in the PCM conversion random storage module.
In one embodiment, the method further comprises:
pre-establishing a corresponding relation between the value of ALAW and the value of PCM;
pre-establishing a corresponding relation between the value of the ULAW and the value of the PCM;
the pre-establishing a correspondence between the value of ALAW and the value of PCM comprises:
establishing a corresponding relation of converting the ALAW value into the PCM value;
establishing a corresponding relation of converting the PCM value into the ALAW value;
the pre-establishing a correspondence between the value of the ULAW and the value of the PCM includes:
converting the value of the ULAW into the corresponding relation of the value of the PCM;
the value of PCM is converted to a correspondence of the value of ULAW.
In one embodiment, the establishing a correspondence relationship between the value of the ALAW and the value of the PCM includes:
storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ALAW value, and establishing a corresponding relation between the ALAW value and the address of the ROM;
the establishing of the corresponding relation of the conversion of the PCM value into the ALAW value comprises the following steps:
storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM;
the establishing of the correspondence relationship of converting the value of the ULAW into the value of the PCM comprises the following steps:
storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM;
the establishing of the correspondence relationship of converting the value of the PCM into the value of the ULAW comprises the following steps:
and storing the value of ULAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
In one embodiment, the method further comprises:
and acquiring a value assigned when the control variable stored in the driving module is initialized, and controlling and calling an ALAW and PCM conversion random storage module or an ULAW and PCM conversion random storage module according to the value of the control variable.
In one of the embodiments, the microprocessor stores the correspondence between values of ALAW and PCM and the correspondence between values of ULAW and PCM for the FPGA in the form of coe files.
According to the voice processing device and the voice processing method, the ALAW and PCM conversion random storage module and the ULAW and PCM conversion random storage module are arranged in the microprocessor, the corresponding relation between the value of the ALAW and the value of the PCM is stored in the ALAW and PCM conversion random storage module, the corresponding relation between the value of the ULAW and the value of the PCM is stored in the ULAW and PCM conversion random storage module, after the data needing to be converted is obtained, the converted data can be obtained by searching the corresponding relation, the voice coding and decoding are carried out by using the microprocessor, the occupation rate of a CPU is reduced, the burden of the CPU is reduced, the concurrent processing capacity of the voice processing device is improved, additional devices are not needed, and the cost is reduced.
Drawings
Fig. 1 is a block diagram showing a conventional speech processing apparatus;
FIG. 2 is a block diagram of a speech processing apparatus according to an embodiment of the present invention;
FIG. 3 is a block diagram of a speech processing apparatus according to another embodiment of the present invention;
FIG. 4 is a flow diagram of a method for speech processing in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 2 is a block diagram of a speech processing apparatus according to an embodiment of the present invention. The voice processing device comprises an analog-to-digital conversion chip 210, a microprocessor 220 and a driving module 230 which are connected in sequence through a bus.
The analog-to-digital conversion chip 210 includes an analog channel and a PCM channel. The analog-to-digital conversion chip 210 may be an FXS/FXO chip, FXS and FXO being the names of ports used by analog telephone lines, and FXS being an interface for driving a telephone set, the interface providing a jack for connecting the telephone set, a driving power supply, and transmitting dial tones. The FXS interface generates and transmits dial-tone voltages to the FXO interface. The analog-to-digital conversion chip 210 is used for converting the analog signal transmitted through the voice transmission network into a PCM digital signal, and converting the PCM digital signal processed and transmitted by the microprocessor 220 into an analog signal, and then transmitting the analog signal through the voice transmission network.
Microprocessor 220 includes PCM data processing module 222, ALAW and PCM conversion ram module 224, ULAW and PCM conversion ram module 226, and transmission interface 228. The microprocessor 220 may be an FPGA or a DSP (Digital signal processor).
The PCM data processing module 222 is connected to the ala w and PCM conversion random access memory module 224 and the ULAW and PCM conversion random access memory module 226 respectively, and the transmission interface 228 is connected to the ala w and PCM conversion random access memory module 224 and the ULAW and PCM conversion random access memory module 226 respectively.
The ALAW and PCM conversion random storage module 224 is used to store a correspondence between values of ALAW and PCM.
The ULAW and PCM conversion random access memory module 226 is used to store a correspondence between values of the ULAW and values of the PCM.
Data received by the transmission interface 228 and data received by the PCM data processing module 222 are converted by calling the ALAW and PCM conversion random access memory module 224 or calling the ULAW and PCM conversion random access memory module 226.
Specifically, the data received by the transmission interface 228 and the data received by the PCM data processing module 222 call the correspondence between the values of ALAW and PCM in the PCM conversion random access memory module 224, or call the correspondence between the values of ULAW and PCM in the PCM conversion random access memory module 226 to convert. Since speech signal conversion is usually done between ALAW and PCM or between ULAW and PCM. When the speech processing device is used, the ALAW or the ULAW may be debugged in advance, for example, if the application belongs to the ALAW, the ALAW and PCM conversion random access memory module 224 is selected to be used, and if the application belongs to the ULAW, the ULAW and PCM conversion random access memory module 226 is selected to be used.
The driving module 230 is configured to transmit the converted data to the application layer or receive data sent by the application layer. The driving module 230 may be a PCIE driving module. The microprocessor 220 and the driving module 230 establish a data transmission channel through the PCI/PCIE bridge and the data bus.
According to the voice processing device, the ALAW and PCM conversion random storage module and the ULAW and PCM conversion random storage module are arranged in the microprocessor, the corresponding relation between the value of the ALAW and the value of the PCM is stored in the ALAW and PCM conversion random storage module, the corresponding relation between the value of the ULAW and the value of the PCM is stored in the ULAW and PCM conversion random storage module, after the data needing to be converted is obtained, the converted data can be obtained by searching the corresponding relation, the voice coding and decoding are performed by using the microprocessor, the occupation rate of a CPU is reduced, the burden of the CPU is reduced, the concurrent processing capacity of the voice processing device is improved, additional devices are not needed, and the cost is reduced.
Fig. 3 is a block diagram showing the structure of a speech processing apparatus according to another embodiment. FIG. 3 is a preferred embodiment of a speech processing apparatus. As shown in fig. 3, the microprocessor is an FPGA. Microprocessor 220 includes a conversion control module 229 in addition to a PCM data processing module 222, an ALAW and PCM conversion ram module 224, a ULAW and PCM conversion ram module 226, and a transmission interface 228.
The ALAW and PCM transform random access memory module 224 comprises an ALAW and PCM transform random access memory submodule 224a and a PCM and ALAW transform random access memory submodule 224 b. The ALAW and PCM conversion random storage sub-module 224a is used for storing the corresponding relation of the conversion of the value of ALAW into the value of PCM; the PCM and ALAW conversion random storage sub-module 224b is used for storing the correspondence of the value of the PCM converted into the value of the ALAW.
The ULAW and PCM conversion ram module 226 includes a ULAW and PCM conversion ram sub-module 226a and a PCM and ULAW conversion ram sub-module 226 b. The ULAW and PCM conversion random storage sub-module 226a is used for storing the corresponding relationship of conversion of the value of the ULAW into the value of the PCM; the PCM and ULAW conversion random storage sub-module 226b is used to store a correspondence relationship between a value of PCM converted to a value of ULAW.
It is understood that the stored correspondence of the value of ALAW to the value of PCM includes: the PCM value is stored in a ROM (Read Only Memory), the address of the ROM has a fixed relation with the ALAW value, and the corresponding relation between the ALAW value and the address of the ROM is established.
Specifically, conversion from ALAW to linear PCM is realized through a short int ALAW2linear (unit8_ t ALAW) function, the input is the value of ALAW, and the output is the value of linear PCM; and storing the output linear PCM value in an array, wherein the position of the stored array has a fixed relation with the input ALAW value, establishing a corresponding relation between the ALAW and the array, thus obtaining the ALAW input value, and searching the converted linear PCM value from the array. The PCM value is stored in a ROM (Read Only Memory), the address of the ROM has a fixed relation with the ALAW value, and the corresponding relation between the ALAW value and the address of the ROM is established.
The correspondence of the stored PCM value to the ALAW value includes: storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
Specifically, the conversion from linear PCM to ALAW is realized through an unscented char linear ALAW (short PCM) function, the input is the linear PCM value, and the output is the ALAW value; and storing the output linear ALAW value in an array, establishing a corresponding relation between the PCM and the array by the position of the stored array and the input PCM value in a fixed relation, acquiring the PCM input value, and searching the converted ALAW value from the array. Storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
The correspondence of the stored value of the ULAW to the value of the PCM includes: and storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM.
Specifically, conversion from the ula to the linear PCM is realized through a short int ula 2linear (unit8_ t ula) function, the input is the value of the ula, and the output is the value of the linear PCM; and storing the output linear PCM value in an array, establishing a corresponding relation between the ULAW and the array when the stored array position and the input ULAW value have a fixed relation, acquiring the ULAW input value in such a way, and searching the converted linear PCM value from the array. And storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM.
The correspondence of the stored PCM value to the ULAW value includes: and storing the value of ULAW in a ROM, wherein the address of the ROM has a fixed relation with the value of the PCM, and establishing the corresponding relation between the value of the PCM and the address of the ROM.
Specifically, the conversion from linear PCM to ULAW is realized through an unscented char linear lag (short PCM) function, the input is the value of the linear PCM, and the output is the value of the ULAW; and storing the output linear ULAW value in an array, wherein the position of the stored array has a fixed relation with the input PCM value, establishing a corresponding relation between the PCM and the array, acquiring the PCM input value, and searching the converted ULAW value from the array. And storing the value of ULAW in a ROM, wherein the address of the ROM has a fixed relation with the value of the PCM, and establishing the corresponding relation between the value of the PCM and the address of the ROM.
The data obtained by the four corresponding relations are stored in four files through the four function implementation modes and are named as ALAW _ PCM.data, PCM _ ALAW.data, ULAW _ PCM.data and PCM _ ULAW.data respectively. The four functions are standard algorithms, such as the g711 algorithm. The corresponding relation between the PCM _ ALAW and the PCM _ ULAW can be optimized, some redundant data can be removed, and the data volume of the data file is reduced.
In order to adapt to FPGA calling, four xilinx FPGA core files are created, wherein the coe files refer to read-only memory initialization files, and the rom initialization files are different in format for different manufacturers. The four data files are changed into coe files according to the rule of the xilinx core file, and are named as ALAW _ PCM.core, PCM _ ALAW.core, ULAW _ PCM.core and PCM _ ULAW.core respectively. One standard coe document is as follows:
MEMORY _ INITIALIZATION _ RADIX ═ 2; the format of data storage, 2, means that the data storage is in binary form, and octal, decimal, hexadecimal, thirty-two, etc. can also be adopted.
MEMORY _ INITIALIZATION _ VECTOR is 01110100, 00100000, 11110101, 00100010, 00000001, 00010100, 00000000, 00000000, 00000000, 00000000; representing the stored data content.
Four random access sub-modules (rams) are generated in the FPGA and named ram _ ALAW _ PCM (i.e., ALAW and PCM conversion random access sub-module 224a), ram _ PCM _ ALAW (i.e., PCM and ALAW conversion random access sub-module 224b), ram _ uaw _ PCM (i.e., ULAW and PCM conversion random access sub-module 226a), ram _ PCM _ uaw (i.e., PCM and ULAW conversion random access sub-module 226b), then ram _ PCM. In addition, a fixed relationship can be established between the address values of the four random access sub-modules and the input values, and the converted values can be found through the address values and serve as the output of the address values.
It will be appreciated that where the microprocessor is an FPGA, the correspondence between the values of ALAW and PCM and the correspondence between values of ULAW and PCM are stored in the form of coe files.
The transition control module 229 is connected to the ALAW and PCM transition random access module 224 and the ULAW and PCM transition random access module 226, respectively.
The driver module 230 is also used to store the control variable u _ alaw _ flags and assign a value to the control variable when the driver is initialized. The conversion control module 229 is used to control the calling of the ALAW and PCM conversion random access memory module 224 or the ULAW and PCM conversion random access memory module 226 according to the value of the control variable. When the value of the control variable is 0, there is a transition between the ULAW and the PCM, otherwise there is a transition between the ALAW and the PCM. Specifically, the control variable u _ ALAW _ flags is a read-write value variable of a register FPGAUALAW _ REG of the FPGA, and when the value of the u _ ALAW _ flags acquired by the register FPGA UALAW _ REG is 0, ram _ ULAW _ PCM and ram _ PCM _ ULAW are enabled, otherwise, ram _ ALAW _ PCM and ram _ PCM _ ALAW are enabled.
According to the voice processing device, the four random storage sub-modules are arranged in the microprocessor, the corresponding data relations are stored in the four random storage sub-modules, after the data needing to be converted are obtained, the converted data can be obtained by searching the corresponding relations, the voice coding and decoding are carried out by using the microprocessor, the occupation rate of a CPU is reduced, the burden of the CPU is reduced, the concurrent processing capacity of the voice processing device is improved, the data relation is stored in a refined mode, the searching is more convenient, the efficiency is high, additional devices are not needed, and the cost is reduced.
FIG. 4 is a flow diagram of a method for speech processing in one embodiment. As shown in fig. 4, the voice processing method is implemented by using the voice processing apparatus, and includes the following steps:
step 402, providing an analog-to-digital conversion chip, a microprocessor and a driving module which are connected in sequence through a bus, wherein the microprocessor comprises a PCM data processing module, an ALAW and PCM conversion random access memory module and an ULAW and PCM conversion random access memory module which are respectively connected with the PCM data processing module, and the transmission interfaces which are respectively connected with the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module.
Specifically, the driving module is configured to transmit the converted data to the application layer or receive data sent by the application layer. The driving module may be a PCIE driving module. The microprocessor and the driving module establish a data transmission channel through the PCI/PCIE bridge and the data bus.
Step 404, converting the data received by the transmission interface and the data received by the PCM data processing module by calling the corresponding relationship between the value of ala w and the value of PCM pre-stored in the PCM conversion random storage module or calling the corresponding relationship between the value of ULAW and the value of PCM pre-stored in the PCM conversion random storage module.
According to the voice processing method, the ALAW and PCM conversion random storage module and the ULAW and PCM conversion random storage module are arranged in the microprocessor, the corresponding relation between the value of the ALAW and the value of the PCM is stored in the ALAW and PCM conversion random storage module, the corresponding relation between the value of the ULAW and the value of the PCM is stored in the ULAW and PCM conversion random storage module, after the data needing to be converted is obtained, the converted data can be obtained by searching the corresponding relation, the microprocessor is used for voice coding and decoding, the occupation rate of a CPU is reduced, the burden of the CPU is reduced, the concurrent processing capacity of the voice processing device is improved, additional devices are not needed, and the cost is reduced.
It is to be understood that, in an embodiment, the above speech processing method further includes: pre-establishing a corresponding relation between the value of ALAW and the value of PCM; and establishing a corresponding relation between the value of the ULAW and the value of the PCM in advance.
The pre-established correspondence between the value of ALAW and the value of PCM comprises:
establishing a corresponding relation of converting the ALAW value into the PCM value;
and establishing a corresponding relation of converting the PCM value into the ALAW value.
Wherein, the establishing of the corresponding relation of converting the ALAW value into the PCM value comprises the following steps: storing the value of the PCM in a ROM, wherein the address of the ROM has a fixed relation with the value of the ALAW; and establishing a corresponding relation between the ALAW value and the address of the ROM.
Specifically, conversion from ALAW to linear PCM is realized through a short int ALAW2linear (unit8_ t ALAW) function, the input is the value of ALAW, and the output is the value of linear PCM; and storing the output linear PCM value in an array, wherein the position of the stored array has a fixed relation with the input ALAW value, establishing a corresponding relation between the ALAW and the array, thus obtaining the ALAW input value, and searching the converted linear PCM value from the array. Storing the value of the PCM in a ROM, wherein the address of the ROM has a fixed relation with the value of the ALAW; and establishing a corresponding relation between the ALAW value and the address of the ROM.
The establishing of the correspondence relationship of the PCM value converted into the ALAW value comprises the following steps: storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
Specifically, the conversion from linear PCM to ALAW is realized through an unscented char linear ALAW (short PCM) function, the input is the linear PCM value, and the output is the ALAW value; and storing the output linear ALAW value in an array, establishing a corresponding relation between the PCM and the array by the position of the stored array and the input PCM value in a fixed relation, acquiring the PCM input value, and searching the converted ALAW value from the array. Storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
The pre-established correspondence between the value of the ULAW and the value of the PCM includes: establishing a corresponding relation for converting the value of the ULAW into the value of the PCM; and establishing a corresponding relation of converting the PCM value into the ULAW value.
The establishing of the correspondence relationship of converting the value of the ULAW into the value of the PCM comprises the following steps: and storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM.
Specifically, conversion from the ula to the linear PCM is realized through a short int ula 2linear (unit8_ t ula) function, the input is the value of the ula, and the output is the value of the linear PCM; and storing the output linear PCM value in an array, establishing a corresponding relation between the ULAW and the array when the stored array position and the input ULAW value have a fixed relation, acquiring the ULAW input value in such a way, and searching the converted linear PCM value from the array. And storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM.
The establishing of the correspondence relationship of the value conversion of the PCM to the value of the ULAW comprises the following steps: and storing the value of the ULAW in an array, wherein the address of the ROM has a fixed relation with the value of the PCM, and establishing the corresponding relation between the value of the PCM and the address of the ROM.
Specifically, the conversion from linear PCM to ULAW is realized through an unscented char linear lag (short PCM) function, the input is the value of the linear PCM, and the output is the value of the ULAW; and storing the output linear ULAW value in an array, wherein the position of the stored array has a fixed relation with the input PCM value, establishing a corresponding relation between the PCM and the array, acquiring the PCM input value, and searching the converted ULAW value from the array. And storing the value of the ULAW in an array, wherein the address of the ROM has a fixed relation with the value of the PCM, and establishing the corresponding relation between the value of the PCM and the address of the ROM.
The data obtained by the four corresponding relations are stored in four files through the four function implementation modes and are named as ALAW _ PCM.data, PCM _ ALAW.data, ULAW _ PCM.data and PCM _ ULAW.data respectively.
In order to adapt to FPGA calling, four xilinx FPGA core files are created, wherein the coe files refer to read-only memory initialization files, and the rom initialization files are different in format for different manufacturers. The four data files are changed into coe files according to the rule of the xilinx core file, and are named as ALAW _ PCM.core, PCM _ ALAW.core, ULAW _ PCM.core and PCM _ ULAW.core respectively.
The microprocessor may be an FPGA or a DSP, and when the microprocessor is an FPGA, the correspondence between the values of the ALAW and the PCM and the correspondence between the values of the ULAW and the PCM are stored in the form of coe files.
In one embodiment, the voice processing method further includes: and acquiring a value assigned when the control variable stored in the driving module is initialized, and controlling and calling the ALAW and PCM conversion random access memory module or the ULAW and PCM conversion random access memory module according to the value of the control variable. Specifically, the control variable u _ ALAW _ flags is a read-write value variable of a register FPGA UALAW _ REG of the FPGA, and when the value of the u _ ALAW _ flags acquired by the register FPGAUALAW _ REG is 0, ram _ ULAW _ PCM and ram _ PCM _ ULAW are enabled, otherwise, ram _ ALAW _ PCM and ram _ PCM _ ALAW are enabled.
In summary, in the above speech processing method, a corresponding relationship is established in which the value of ALAW is converted into the value of PCM; establishing a corresponding relation of converting the PCM value into the ALAW value, and establishing a corresponding relation of converting the ULAW value into the PCM value; the method comprises the steps of establishing a corresponding relation of converting a PCM value into an ULAW value, obtaining converted data by searching the corresponding relation after the data needing to be converted are obtained, and performing voice coding and decoding by using a microprocessor, so that the occupation rate of a CPU is reduced, the burden of the CPU is reduced, the concurrent processing capacity of a voice processing device is improved, the corresponding relation is stored in a refined mode, the searching is more convenient, the efficiency is high, additional devices are not needed, and the cost is reduced.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A voice processing device comprises an analog-digital conversion chip, a microprocessor and a driving module which are connected in sequence through a bus, it is characterized in that the microprocessor comprises a PCM data processing module, an ALAW and PCM conversion random access memory module, an ULAW and PCM conversion random access memory module and a transmission interface, wherein the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module are respectively connected with the PCM data processing module, the transmission interface is respectively connected with the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module, the ALAW and PCM conversion random storage module is used for storing the corresponding relation between the value of ALAW and the value of PCM, the ULAW and PCM conversion random storage module is used for storing the corresponding relation between the value of ULAW and the value of PCM, and the data received by the transmission interface and the data received by the PCM data processing module are converted by calling an ALAW and PCM conversion random storage module or calling an ULAW and PCM conversion random storage module.
2. The speech processing device according to claim 1, wherein the ALAW and PCM conversion random access memory module comprises an ALAW and PCM conversion random access memory sub-module and a PCM and ALAW conversion random access sub-module, the ALAW and PCM conversion random access sub-module is used for storing a corresponding relationship of a value of ALAW converted into a value of PCM; the PCM and ALAW conversion random storage sub-module is used for storing the corresponding relation of the value of the PCM converted into the value of the ALAW; the ULAW and PCM conversion random access memory module comprises an ULAW and PCM conversion random access memory sub-module and a PCM and ULAW conversion random access memory sub-module, and the ULAW and PCM conversion random access memory sub-module is used for storing the corresponding relation of conversion of the value of the ULAW into the value of the PCM; and the PCM and ULAW conversion random storage sub-module is used for storing the corresponding relation of the value conversion of the PCM into the value of the ULAW.
3. The speech processing apparatus according to claim 2, wherein the stored correspondence of values of ALAW to values of PCM comprises: storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ALAW value, and establishing a corresponding relation between the ALAW value and the address of the ROM;
the correspondence of the stored PCM value to the ALAW value includes: storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM;
the correspondence of the stored value of the ULAW to the value of the PCM includes: storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM;
the correspondence of the stored PCM value to the ula w value includes: and storing the value of ULAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
4. The speech processing apparatus of claim 1 wherein the microprocessor further comprises a transition control module, the transition control module being connected to the ALAW and PCM transition ram module and the ULAW and PCM transition ram module, respectively; the drive module is also used for storing a control variable and assigning a value to the control variable during drive initialization; the conversion control module is used for controlling and calling an ALAW and PCM conversion random access memory module or an ULAW and PCM conversion random access memory module according to the value of the control variable.
5. The speech processing device according to claim 1, wherein the microprocessor is an FPGA, and the correspondence between the values of the ALAW and the PCM and the correspondence between the values of the ULAW and the PCM are stored in the form of coe files.
6. A method of speech processing comprising the steps of:
providing an analog-to-digital conversion chip, a microprocessor and a PCIE driving module which are sequentially connected through a bus, wherein the microprocessor comprises a PCM data processing module, an ALAW and PCM conversion random access memory module, an ULAW and PCM conversion random access memory module and a transmission interface, the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module are respectively connected with the PCM data processing module, and the transmission interface is respectively connected with the ALAW and PCM conversion random access memory module and the ULAW and PCM conversion random access memory module;
and converting the data received by the transmission interface and the data received by the PCM data processing module by calling the corresponding relation between the ALAW value and the PCM value pre-stored in the PCM conversion random storage module or calling the corresponding relation between the ULAW value and the ULAW value pre-stored in the PCM conversion random storage module.
7. The speech processing method of claim 6, wherein the method further comprises:
pre-establishing a corresponding relation between the value of ALAW and the value of PCM;
pre-establishing a corresponding relation between the value of the ULAW and the value of the PCM;
the pre-establishing a correspondence between the value of ALAW and the value of PCM comprises:
establishing a corresponding relation of converting the ALAW value into the PCM value;
establishing a corresponding relation of converting the PCM value into the ALAW value;
the pre-establishing a correspondence between the value of the ULAW and the value of the PCM includes:
converting the value of the ULAW into the corresponding relation of the value of the PCM;
the value of PCM is converted to a correspondence of the value of ULAW.
8. The speech processing method according to claim 7, wherein said establishing a correspondence of values of ALAW to values of PCM comprises:
storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ALAW value, and establishing a corresponding relation between the ALAW value and the address of the ROM;
the establishing of the corresponding relation of the conversion of the PCM value into the ALAW value comprises the following steps:
storing the value of ALAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM;
the establishing of the correspondence relationship of converting the value of the ULAW into the value of the PCM comprises the following steps:
storing the PCM value in a ROM, wherein the address of the ROM has a fixed relation with the ULAW value, and establishing a corresponding relation between the ULAW value and the address of the ROM;
the establishing of the correspondence relationship of converting the value of the PCM into the value of the ULAW comprises the following steps:
and storing the value of ULAW in a ROM, wherein the address of the ROM has a fixed relation with the value of PCM, and establishing the corresponding relation between the value of PCM and the address of the ROM.
9. The speech processing method of claim 6, wherein the method further comprises:
and acquiring a value assigned when the control variable stored in the driving module is initialized, and controlling and calling an ALAW and PCM conversion random storage module or an ULAW and PCM conversion random storage module according to the value of the control variable.
10. The speech processing method according to claim 6, wherein the microprocessor is an FPGA and the correspondence between the values of ALAW and PCM and the correspondence between the values of ULAW and PCM are stored in the form of coe files.
CN201410205793.0A 2014-05-15 2014-05-15 Voice processing device and method Active CN105094978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410205793.0A CN105094978B (en) 2014-05-15 2014-05-15 Voice processing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410205793.0A CN105094978B (en) 2014-05-15 2014-05-15 Voice processing device and method

Publications (2)

Publication Number Publication Date
CN105094978A CN105094978A (en) 2015-11-25
CN105094978B true CN105094978B (en) 2020-02-28

Family

ID=54575486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410205793.0A Active CN105094978B (en) 2014-05-15 2014-05-15 Voice processing device and method

Country Status (1)

Country Link
CN (1) CN105094978B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122320B (en) * 2016-02-25 2021-02-09 邦彦技术股份有限公司 Device, system and method for realizing PCM audio playing based on FPGA

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101500159A (en) * 2008-01-31 2009-08-05 华为技术有限公司 Method and apparatus for image entropy encoding, entropy decoding
CN102280048A (en) * 2011-08-13 2011-12-14 德州学院 Auxiliary English word memorizing device and using method thereof
CN103051817A (en) * 2011-10-14 2013-04-17 苏州鼎尚信息技术有限公司 Method and voice terminal device for realizing pulse code modulation (PCM) information interaction by utilizing serial peripheral interface (SPI) interface
CN202996288U (en) * 2012-12-24 2013-06-12 中国电子科技集团公司第五十研究所 Digital voice bi-directional processing device
CN103402036A (en) * 2013-07-24 2013-11-20 广东翼卡车联网服务有限公司 DTMF (dual-tone multifrequency) decoding method and system based on Android system navigator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004326922A (en) * 2003-04-24 2004-11-18 Sony Corp Information processing device and method
CN1269021C (en) * 2003-05-29 2006-08-09 华为技术有限公司 Playback method and device
CN202334610U (en) * 2011-10-14 2012-07-11 苏州鼎尚信息技术有限公司 Voice terminal equipment
CN103533129B (en) * 2013-10-23 2017-06-23 上海斐讯数据通信技术有限公司 Real-time voiced translation communication means, system and the communication apparatus being applicable

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101500159A (en) * 2008-01-31 2009-08-05 华为技术有限公司 Method and apparatus for image entropy encoding, entropy decoding
CN102280048A (en) * 2011-08-13 2011-12-14 德州学院 Auxiliary English word memorizing device and using method thereof
CN103051817A (en) * 2011-10-14 2013-04-17 苏州鼎尚信息技术有限公司 Method and voice terminal device for realizing pulse code modulation (PCM) information interaction by utilizing serial peripheral interface (SPI) interface
CN202996288U (en) * 2012-12-24 2013-06-12 中国电子科技集团公司第五十研究所 Digital voice bi-directional processing device
CN103402036A (en) * 2013-07-24 2013-11-20 广东翼卡车联网服务有限公司 DTMF (dual-tone multifrequency) decoding method and system based on Android system navigator

Also Published As

Publication number Publication date
CN105094978A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN104199927B (en) Data processing method and data processing equipment
CN110784225A (en) Data compression method, data decompression method, related device, electronic equipment and system
KR20140130196A (en) System, method, and computer program product for decompression of block compressed images
CN1708997A (en) Method and apparatus for DTMF detection and voice mixing in the CELP parameter domain
US4661946A (en) Digital switch module having encoding law conversion capability
CN105338353A (en) Simplified range and context update for multimedia context-adaptive binary arithmetic coding design
JP2014027658A (en) Compression encoding and decoding method and apparatus
CN105094978B (en) Voice processing device and method
CN107431492A (en) Compressing and coding apparatus, compaction coding method, decoding device, coding/decoding method and program
CN110620721A (en) Gateway equipment, application method and service system
US9961209B2 (en) Codec selection optimization
CN110750295B (en) Information processing method, device, electronic equipment and storage medium
CN112099655A (en) Method and device for realizing mobile office through voice mouse, computer equipment and storage medium
CN101465911A (en) 3G visual fixed telephone
CN115567059A (en) Data compression and decompression method and device
CN116561202A (en) Method and device for serializing object
CN113450807B (en) Method and device for compressing voice digital signal
CN112398870A (en) Cross-platform protocol generation method, device, system, equipment and storage medium
KR0151628B1 (en) Pcm data conversion system
US9264707B2 (en) Multi-symbol run-length coding
JPH0818518A (en) Data compression device with bit rate changeover function by dsp and its method
CN1320443C (en) Sound effect processing circuit
KR100238032B1 (en) Audio codec pcmcia card of notebook personal computer
CA1152650A (en) Pcm and pam conversion circuit including signal level variation on the pcm portion of the circuit
JP2778472B2 (en) Data processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211130

Address after: 510800 Shenzhen, Futian District, Guangdong Futian street Gangxia community Shennan Road No. 1003 Dongfang Xintiandi Plaza 5 floor 502F

Patentee after: Guangdong Industrial edge intelligent Innovation Center Co.,Ltd.

Address before: 518057 Guangdong city of Shenzhen province Nanshan District high in the four EVOC Technology Building No. 31

Patentee before: EVOC INTELLIGENT TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right