CN117672238A - Audio conversion method, device, equipment and medium - Google Patents

Audio conversion method, device, equipment and medium Download PDF

Info

Publication number
CN117672238A
CN117672238A CN202311716818.9A CN202311716818A CN117672238A CN 117672238 A CN117672238 A CN 117672238A CN 202311716818 A CN202311716818 A CN 202311716818A CN 117672238 A CN117672238 A CN 117672238A
Authority
CN
China
Prior art keywords
audio
format
target
source
conversion
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.)
Pending
Application number
CN202311716818.9A
Other languages
Chinese (zh)
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.)
Xinan Weizhong Shanghai Microelectronics Technology Co ltd
Original Assignee
Xinan Weizhong Shanghai Microelectronics 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 Xinan Weizhong Shanghai Microelectronics Technology Co ltd filed Critical Xinan Weizhong Shanghai Microelectronics Technology Co ltd
Priority to CN202311716818.9A priority Critical patent/CN117672238A/en
Publication of CN117672238A publication Critical patent/CN117672238A/en
Pending legal-status Critical Current

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The embodiment of the disclosure relates to an audio conversion method, device, equipment and medium, wherein the method comprises the following steps: acquiring an audio file identifier, acquiring a source audio file in an object storage service according to the audio file identifier, processing the source audio file to obtain a decrypted audio stream, acquiring a target audio format, and determining an audio conversion adapter to process the decrypted audio stream according to the source audio format and the target audio format of the source audio file to obtain the target format audio stream. By adopting the technical scheme, the format conversion of the audio stream is performed by utilizing customization, and the audio conversion adapter is provided for processing and converting the audio data, so that the conversion of various audio formats can be rapidly and conveniently realized, the audio processing and coding and decoding details of the bottom layer are not required to be deeply known, and the running environment of audio conversion is not required to be relied on and installed.

Description

Audio conversion method, device, equipment and medium
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to an audio conversion method, device, equipment and medium.
Background
Typically, a voice memo function on board the vehicle allows a user to record an audio memo through the vehicle and store it in an in-vehicle memory device. To ensure the security and backup of data, these recorded audio files need to be synchronized to the cloud for backup. After the audio file is synchronized to the cloud, the cloud needs to compress and convert the corresponding audio format so as to realize more efficient storage and audio-to-text conversion functions.
In the related art, audio is converted by instructions based on FFmpeg (an open source computer program) environment, and a corresponding audio file is converted into a desired format. This approach requires the installation of an FFmpeg environment and running other languages to execute instructions, a process that is cumbersome and cumbersome.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an audio conversion method, apparatus, device, and medium.
The embodiment of the disclosure provides an audio conversion method, which comprises the following steps:
acquiring an audio file identifier, and acquiring a source audio file from an object storage service according to the audio file identifier;
processing the source audio file to obtain a decrypted audio stream;
acquiring a target audio format;
and determining an audio conversion adapter to process the decrypted audio stream according to the source audio format of the source audio file and the target audio format to obtain the target format audio stream.
Optionally, the audio conversion method further includes:
receiving an audio file to be processed sent by a vehicle machine;
encrypting the audio file to be processed to obtain the source audio file;
the source audio file is stored in association with the audio file identification at the object storage service.
Optionally, the audio conversion method further includes:
acquiring an audio format identifier of the source audio file;
and verifying whether the source audio format is consistent with the audio format corresponding to the audio format identifier.
Optionally, the audio conversion method further includes:
constructing an initial audio format conversion environment;
registering different preset environments or scripts to the initial audio format conversion environment to obtain a target audio format conversion environment.
Optionally, the determining, according to the source audio format of the source audio file and the target audio format, the audio conversion adapter to process the decrypted audio stream to obtain the target format audio stream includes:
calling an audio analysis class to analyze the source audio file based on the audio conversion adapter to acquire source audio information;
invoking the target audio format conversion environment based on a target tool class;
constructing target audio information according to the source audio information and the target audio format based on the target audio format conversion environment;
and calling an audio stream acquisition function to process the decrypted audio stream according to the target audio information to obtain the target format audio stream.
Optionally, the audio conversion method further includes:
writing the target format audio stream into a byte array to obtain an audio stream to be converted;
and identifying the audio stream to be converted based on a voice identification algorithm to obtain a target text.
The embodiment of the disclosure also provides an audio conversion device, which comprises:
the first acquisition module is used for acquiring an audio file identifier and acquiring a source audio file in the object storage service according to the audio file identifier;
the first processing module is used for processing the source audio file to obtain a decrypted audio stream;
the second acquisition module is used for acquiring a target audio format;
and the second processing module is used for determining an audio conversion adapter to process the decrypted audio stream according to the source audio format of the source audio file and the target audio format to obtain the target format audio stream.
The embodiment of the disclosure also provides an electronic device, which comprises: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instructions from the memory and execute the instructions to implement an audio conversion method as provided in an embodiment of the disclosure.
The present disclosure also provides a computer-readable storage medium storing a computer program for executing the audio conversion method as provided by the embodiments of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the audio conversion scheme provided by the embodiment of the disclosure, the audio file identification is acquired, the source audio file is acquired in the object storage service according to the audio file identification, the source audio file is processed to obtain the decrypted audio stream, the target audio format is acquired, and the audio conversion adapter is determined to process the decrypted audio stream according to the source audio format and the target audio format of the source audio file to obtain the target format audio stream. By adopting the technical scheme, the format conversion of the audio stream is performed by utilizing customization, and the audio conversion adapter is provided for processing and converting the audio data, so that the conversion of various audio formats can be rapidly and conveniently realized, the audio processing and coding and decoding details of the bottom layer are not required to be deeply known, and the running environment of audio conversion is not required to be relied on and installed.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a schematic flow chart of an audio conversion method according to an embodiment of the disclosure;
FIG. 2 is an exemplary diagram of another audio conversion provided by an embodiment of the present disclosure;
FIG. 3 is an exemplary diagram of an audio conversion provided by an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an audio conversion device according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The voice memo function on the vehicle is a complex application scene relating to a plurality of technical fields, and the high-efficiency, stable and reliable service can be realized only through deep demand analysis and technical research and development. The voice memo function allows the user to record an audio memo through the car set and store it in the in-car storage device. To ensure the security and backup of data, these recorded audio files need to be synchronized to the cloud for backup.
After the audio file is synchronized to the cloud, the cloud needs to compress and convert the corresponding audio format so as to realize more efficient storage and audio-to-text conversion functions. Before converting the format, a certain degree of compression is required for the audio to save storage space and increase file transfer speed. When the user needs to convert the audio file into the text memo, the compressed and converted audio file can generate the corresponding text memo. This way the functionality can be used without the need to install the FFmpeg environment.
FFmpeg, among other things, is an open source computer program that can be used to record, convert digital audio and video, and convert it into a binary stream. It provides a complete set of solutions including recording, converting and streaming audio and video, using LGPL (LESSER GENERAL PUBLIC LICENSE) or GPL LICENSEs.
In the existing mode, audio is converted through instructions based on the FFmpeg environment, corresponding audio files are converted into a required format, a set of FFmpeg environment is required to be installed in different system environments, and in addition, the FFmpeg environment is used as a very powerful command line tool, and certain learning cost is required for initial understanding and use of users.
According to the audio conversion method disclosed by the embodiment of the disclosure, a user can store the recorded audio file into the system through the recording function on the system. Subsequently, through an uploading function on the system, the audio file can be uploaded to a cloud (cloud server) and converted into an audio file in a target format for better processing and transcoding.
Thus, the audio stream is formatted and processed using the customized library. Support common multi-format interconversions, such as: AAC (an advanced audio coding format which is mainly used for compressing audio data to reduce file size and transmission bandwidth while maintaining high sound quality), PCM (a lossless coding mode capable of accurately restoring original audio data), MP3 (a digital audio coding format which can compress the size of an audio file to about 1/12 of the original size with little loss of sound quality), MP4 (a digital multimedia container format which is formulated and standardized by the international organization for standardization (ISO)), AVI (audio video interleave format) and WAV (waveform audio file format which support a plurality of audio bit numbers, sampling frequencies and channels, which is excellent in sound quality, belonging to an audio format without compression and lossless), and the like. The audio conversion adapter provides a convenient function and method through encapsulation, so that the implementation of audio format conversion in Java items becomes easy and efficient. The developer does not need to have deep knowledge of the underlying audio processing nor rely on or install the FFmpeg runtime environment.
Fig. 1 is a schematic flow chart of an audio conversion method according to an embodiment of the present disclosure, where the method may be performed by an audio conversion device, and the device may be implemented in software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method includes:
step 101, acquiring an audio file identifier, and acquiring a source audio file in the object storage service according to the audio file identifier.
In the embodiment of the disclosure, a user can record an audio file through a voice memo function on the vehicle, encrypt the audio file and store the encrypted audio file in association with an audio file identifier in an object storage service. Wherein, the format of the audio file can be one of PCM, MP3, MP4, AVI, WAV and the like; the audio format may be identified by an audio format identification, with different audio format identifications corresponding to different audio formats.
In the embodiment of the disclosure, an audio file identifier is obtained, and a source audio file is obtained by matching in an object storage service according to the audio file identifier; wherein the audio file identification is capable of uniquely identifying an audio file.
And 102, processing the source audio file to obtain a decrypted audio stream.
In some embodiments, after the source audio file is acquired, the source audio file is decrypted, converted, etc., to obtain a decrypted audio stream; wherein a decrypted audio stream may be understood as a binary data stream that is not encrypted.
Step 103, obtaining the target audio format.
Step 104, determining the audio conversion adapter to process the decrypted audio stream according to the source audio format and the target audio format of the source audio file to obtain the target format audio stream.
In the embodiment of the disclosure, the audio format identifier of the source audio file may also be obtained before conversion, and whether the source audio format is consistent with the audio format corresponding to the audio format identifier is verified. That is, whether the format of the source audio file is consistent with the identified format is verified, the accuracy of subsequent processing is further guaranteed, the use requirement of a user is met, and the use experience of the user is improved.
In the embodiment of the present disclosure, the target audio format refers to a converted audio format, and a user can select settings according to the application scene requirement, as an example, the user inputs the target audio format; as another example, the target audio format is automatically matched according to the current application scenario.
In the embodiment of the disclosure, the method for processing the decrypted audio stream by the audio conversion adapter according to the source audio format and the target audio format of the source audio file is various, in a specific implementation manner, the source audio file is analyzed based on the audio conversion adapter calling the audio analysis class, the source audio information is acquired, the target audio format conversion environment is called based on the target tool class, the target audio information is constructed based on the target audio format conversion environment according to the source audio information and the target audio format, and the decrypted audio stream is processed according to the target audio information by calling the function for acquiring the audio stream to acquire the target format audio stream.
Specifically, operating the FFAudio FileReader class, and initializing an FFmpeg environment by using FFSampledSP; obtaining source audio information including parameters such as resolution, frame rate and the like through FFAudio FileReader; creating AudioFormat initializes various parameters including: sampling rate, resolution, frame rate, number of channels and coding type; and calling a getAudioInputStream method to load the decrypted audio stream according to each initialized parameter to obtain the decoded and converted AudioInputStream object.
In some embodiments, an initial audio format conversion environment is constructed, and a preset different environment or script is registered to the initial audio format conversion environment to obtain a target audio format conversion environment.
Specifically, the function of audio inter-conversion can be realized only by installing the FFmpeg program originally, and the FFmpeg tool program is not required to be installed again on the server in the embodiment of the disclosure, so that the FFmpeg tool program is directly installed and used in different environments. More specifically, the FFmpeg running environment is built through initialization, and different preset environment dll/so scripts are registered in the FFmpeg running environment.
According to the audio conversion scheme provided by the embodiment of the disclosure, the audio file identification is acquired, the source audio file is acquired in the object storage service according to the audio file identification, the source audio file is processed to obtain the decrypted audio stream, the target audio format is acquired, and the audio conversion adapter is determined to process the decrypted audio stream according to the source audio format and the target audio format of the source audio file to obtain the target format audio stream. By adopting the technical scheme, the format conversion of the audio stream is performed by utilizing customization, and the audio conversion adapter is provided for processing and converting the audio data, so that the conversion of various audio formats can be rapidly and conveniently realized, the audio processing and coding and decoding details of the bottom layer are not required to be deeply known, and the running environment of audio conversion is not required to be relied on and installed.
In some embodiments, after obtaining the audio stream in the target format, further processing is performed, as shown in fig. 2, including:
step 201, writing the audio stream in the target format into a byte array to obtain an audio stream to be converted.
Step 202, recognizing the audio stream to be converted based on a voice recognition algorithm to obtain a target text.
Specifically, an AudioInputStream object is written into a byte array (byteararrayoutputstream) output stream; after the object is obtained through conversion, a toByteArray () method is called to obtain a byte array, and then an ASR (Automatic Speech Recognition ) technology is called to perform speech-to-text conversion to obtain a target text.
As an example of a scenario, as shown in fig. 3, step 3.1, the vehicle side synchronizes audio data, that is, the vehicle side uploads encrypted audio to OSS (Object Storage Service ), and synchronizes the audio file identifier to the cloud server; step 3.2, checking whether audio exists, namely checking whether an audio file exists in a designated OSS address; step 3.3OSS downloads the audio, namely reads the audio file on the object storage service and converts the audio file into a decrypted audio stream; step 3.4, checking the audio format, namely performing format verification and matching conversion type on the decrypted audio stream, and automatically creating a target audio format; step 3.5, constructing an analysis adapter, namely automatically identifying the decrypted audio stream based on the audio format identifier and converting the decrypted audio stream into the audio in the target format, and constructing an audio conversion adapter.
Step 3.6, calling FFSampledSP, operating FFAudio FileReader class to process the decrypted audio stream to obtain audio information, and initializing FFmpeg environment by using FFSampledSP; step 3.7, obtaining audio information, including parameters such as resolution, frame rate, time and the like; step 3.8, initializing source audio (initializing parameters such as resolution, frame rate, time and the like) and a target sampling rate; step 3.9 creating a new designated coding type; step 3.10, decoding and converting, namely calling a getAudioInputstream method to load a decrypted audio stream, and decoding a converted AudioInputstream object; step 3.11, converting the audio input stream object into a byte array () (ByteArrayOutputStream) output stream; and 3.12, voice recognition of a memo text, namely, after the memo text is converted to obtain an object, calling a toByteArray () method to obtain a byte array, and then calling ASR voice recognition voice to convert the text.
Through the step 3.6, the function of audio inter-conversion can be realized only by installing the FFmpeg program originally, and the novel scheme does not need to install the FFmpeg tool program on the cloud server again, so that the FFmpeg tool program is directly used in different environments without installation. The method specifically comprises the following steps: step 3.6.1 registers the component, declares, step 3.6.1 initializes the FFmpeg environment, step 3.6.3 registers a preset different environment dll/so script into the FFmpeg and step 3.6.4 builds the FFmpeg to obtain audio information decoding.
Thus, the format conversion of the audio stream is done with customization, which provides a set of simple and powerful APIs (Application Programming Interface ) for processing and converting the audio data. The developer can easily realize the conversion of various audio formats in Java projects without needing to go deep into the details of audio processing and encoding and decoding of the bottom layer and without needing to rely on and install the running environment of FFmpeg. This enables a fast conversion function to be implemented quickly and efficiently for JAVA developers who are not familiar with audio conversion.
Fig. 4 is a schematic structural diagram of an audio conversion device according to an embodiment of the present disclosure, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 4, the apparatus includes:
a first obtaining module 401, configured to obtain an audio file identifier, and obtain a source audio file in an object storage service according to the audio file identifier;
a first processing module 402, configured to process the source audio file to obtain a decrypted audio stream;
a second obtaining module 403, configured to obtain a target audio format;
and the second processing module 404 is configured to determine, according to the source audio format of the source audio file and the target audio format, that the audio conversion adapter processes the decrypted audio stream to obtain a target format audio stream.
Optionally, the apparatus further includes:
the receiving module is used for receiving the audio file to be processed sent by the vehicle machine;
the encryption module is used for encrypting the audio file to be processed to obtain the source audio file;
and the storage module is used for storing the source audio file and the audio file identification in the object storage service in an associated mode.
Optionally, the apparatus further includes:
a third obtaining module, configured to obtain an audio format identifier of the source audio file;
and the verification module is used for verifying whether the source audio format is consistent with the audio format corresponding to the audio format identifier.
Optionally, the apparatus further includes:
the building module is used for building an initial audio format conversion environment;
the registration module is used for registering different preset environments or scripts to the initial audio format conversion environment to obtain a target audio format conversion environment.
Optionally, the second processing module is specifically configured to:
calling an audio analysis class to analyze the source audio file based on the audio conversion adapter to acquire source audio information;
invoking the target audio format conversion environment based on a target tool class;
constructing target audio information according to the source audio information and the target audio format based on the target audio format conversion environment;
and calling an audio stream acquisition function to process the decrypted audio stream according to the target audio information to obtain the target format audio stream.
Optionally, the apparatus further includes:
the writing module is used for writing the target format audio stream into a byte array to obtain an audio stream to be converted;
and the recognition module is used for recognizing the audio stream to be converted based on a voice recognition algorithm to obtain a target text.
The audio conversion device provided by the embodiment of the disclosure can execute the audio conversion method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
The disclosed embodiments also provide a computer program product comprising a computer program/instructions which, when executed by a processor, implement the audio conversion method provided by any of the embodiments of the disclosure.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. Referring now in particular to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 500 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. When the computer program is executed by the processing device 501, the above-described functions defined in the audio conversion method of the embodiment of the present disclosure are performed.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an audio file identifier, acquiring a source audio file in an object storage service according to the audio file identifier, processing the source audio file to obtain a decrypted audio stream, acquiring a target audio format, and determining an audio conversion adapter to process the decrypted audio stream according to the source audio format and the target audio format of the source audio file to obtain the target format audio stream.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement any of the audio conversion methods provided in the present disclosure.
According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium storing a computer program for performing any one of the audio conversion methods provided by the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. An audio conversion method is characterized by being applied to a cloud server and comprising the following steps:
acquiring an audio file identifier, and acquiring a source audio file from an object storage service according to the audio file identifier;
processing the source audio file to obtain a decrypted audio stream;
acquiring a target audio format;
and determining an audio conversion adapter to process the decrypted audio stream according to the source audio format of the source audio file and the target audio format to obtain the target format audio stream.
2. The audio conversion method according to claim 1, further comprising:
receiving an audio file to be processed sent by a vehicle machine;
encrypting the audio file to be processed to obtain the source audio file;
the source audio file is stored in association with the audio file identification at the object storage service.
3. The audio conversion method according to claim 1, further comprising:
acquiring an audio format identifier of the source audio file;
and verifying whether the source audio format is consistent with the audio format corresponding to the audio format identifier.
4. The audio conversion method according to claim 1, further comprising:
constructing an initial audio format conversion environment;
registering different preset environments or scripts to the initial audio format conversion environment to obtain a target audio format conversion environment.
5. The audio conversion method according to claim 4, wherein the determining the audio conversion adapter according to the source audio format of the source audio file and the target audio format processes the decrypted audio stream to obtain the target format audio stream, comprises:
calling an audio analysis class to analyze the source audio file based on the audio conversion adapter to acquire source audio information;
invoking the target audio format conversion environment based on a target tool class;
constructing target audio information according to the source audio information and the target audio format based on the target audio format conversion environment;
and calling an audio stream acquisition function to process the decrypted audio stream according to the target audio information to obtain the target format audio stream.
6. The audio conversion method according to claim 1, further comprising:
writing the target format audio stream into a byte array to obtain an audio stream to be converted;
and identifying the audio stream to be converted based on a voice identification algorithm to obtain a target text.
7. An audio conversion device, comprising:
the first acquisition module is used for acquiring an audio file identifier and acquiring a source audio file in the object storage service according to the audio file identifier;
the first processing module is used for processing the source audio file to obtain a decrypted audio stream;
the second acquisition module is used for acquiring a target audio format;
and the second processing module is used for determining an audio conversion adapter to process the decrypted audio stream according to the source audio format of the source audio file and the target audio format to obtain the target format audio stream.
8. The audio conversion device of claim 7, further comprising:
the receiving module is used for receiving the audio file to be processed sent by the vehicle machine;
the encryption module is used for encrypting the audio file to be processed to obtain the source audio file;
and the storage module is used for storing the source audio file and the audio file identification in the object storage service in an associated mode.
9. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the audio conversion method of any of the preceding claims 1-6.
10. A computer readable storage medium, characterized in that the storage medium stores a computer program for executing the audio conversion method of any one of the preceding claims 1-6.
CN202311716818.9A 2023-12-13 2023-12-13 Audio conversion method, device, equipment and medium Pending CN117672238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311716818.9A CN117672238A (en) 2023-12-13 2023-12-13 Audio conversion method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311716818.9A CN117672238A (en) 2023-12-13 2023-12-13 Audio conversion method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117672238A true CN117672238A (en) 2024-03-08

Family

ID=90082448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311716818.9A Pending CN117672238A (en) 2023-12-13 2023-12-13 Audio conversion method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117672238A (en)

Similar Documents

Publication Publication Date Title
CN110213614B (en) Method and device for extracting key frame from video file
CN111078930A (en) Audio file data processing method and device
CN110545472B (en) Video data processing method and device, electronic equipment and computer readable medium
US20130178964A1 (en) Audio system with adaptable audio output
CN112596720A (en) Service operation method and device, electronic equipment and computer storage medium
CN109697034B (en) Data writing method and device, electronic equipment and storage medium
CN111459822A (en) Method, device and equipment for extracting system component data and readable medium
CN112954453B (en) Video dubbing method and device, storage medium and electronic equipment
CN112752118B (en) Video generation method, device, equipment and storage medium
US20130178963A1 (en) Audio system with adaptable equalization
US11302308B2 (en) Synthetic narrowband data generation for narrowband automatic speech recognition systems
CN117672238A (en) Audio conversion method, device, equipment and medium
CN116072108A (en) Model generation method, voice recognition method, device, medium and equipment
CN109375892B (en) Method and apparatus for playing audio
CN102077190A (en) Media foundation source reader
CN115209215A (en) Video processing method, device and equipment
CN113032345A (en) File processing method, device, terminal and non-transitory storage medium
CN115065852B (en) Sound and picture synchronization method and device, electronic equipment and readable storage medium
CN110545107A (en) data processing method and device, electronic equipment and computer readable storage medium
CN111145769A (en) Audio processing method and device
CN113395581B (en) Audio playing method and device, electronic equipment and storage medium
CN114640826B (en) Data processing method, device, readable medium and electronic equipment
CN116760992B (en) Video encoding, authentication, encryption and transmission methods, devices, equipment and media
CN112149168B (en) File data encryption method and device and electronic equipment
CN111768762B (en) Voice recognition method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination