Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for controlling a recording robot, so as to solve the problems in the prior art that a conventional recording apparatus cannot move autonomously, can only be fixed at a certain position or passively change the position, and cannot automatically adjust recording parameters according to the surrounding environment.
A first aspect of an embodiment of the present invention provides a method for controlling a recording robot, including:
obtaining a target position through sound source positioning;
planning a moving path according to the current position and the target position;
controlling the recording robot to move to the target position according to the moving path;
acquiring environmental parameters of the target position;
adjusting the recording parameters of the recording robot according to the environmental parameters;
and controlling the recording robot to record according to the recording parameters.
Further, the controlling the recording robot to move to the target position according to the moving path includes:
detecting whether an obstacle is encountered by an obstacle detection device;
and if the obstacle is detected to exist, replanning a moving path, and controlling the recording robot to move according to the replanning moving path until the recording robot reaches the target position.
Further, the acquiring the environmental parameter of the target location includes:
and detecting the ambient volume of the target position.
Further, the adjusting the recording parameters of the recording robot according to the environmental parameters includes:
and adjusting the recording time length, the recording format, the recording sound size and the recording quality of the recording robot according to the environment volume.
Further, the setting of the recording parameters of the recording robot according to the environment parameters further includes:
the noise of the microphone that control and sound source relative setting reduced, or the recording of the microphone that control and sound source do not relative setting is shielded, wherein, recording robot's dispersion is provided with a plurality of microphones all around.
Further, the method also comprises the following steps:
and if an input recording parameter setting instruction is received, controlling the recording robot to record according to the recording parameters included by the recording parameter setting instruction.
Further, if an input recording parameter setting instruction is received, the recording robot is controlled to record according to the recording parameter included in the recording parameter setting instruction, and the method further includes:
and receiving a recording parameter setting instruction input by a user terminal or a user voice.
A second aspect of an embodiment of the present invention provides a control apparatus for a recording robot, including:
a target position acquisition unit for acquiring a target position by sound source localization;
the path planning unit is used for planning a moving path according to the current position and the target position;
the movement control unit is used for controlling the recording robot to move to the target position according to the movement path;
an environmental parameter acquiring unit, configured to acquire an environmental parameter of the target location;
the recording parameter adjusting unit is used for adjusting the recording parameters of the recording robot according to the environment parameters;
a recording control unit for controlling the recording robot to record according to the recording parameters
A third aspect of an embodiment of the present invention provides a recording robot, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor, when executing the computer program, realizes the steps of the method according to the first aspect.
A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program. Which when executed by a processor implements the steps of the method according to the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the robot capable of moving autonomously is combined with the recording equipment, so that the problem that the traditional recording equipment cannot move at any time and can only be fixed at a certain position is solved. The recording robot can also adjust and adjust various parameters of the recording automatically according to the environmental state of the target position, so that the recording is more intelligent and interesting.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an implementation of a recording robot control method according to an embodiment of the present invention, including steps S101 to S106.
Step S101, obtaining the target position through sound source positioning.
Sound source localization, the purpose of which is to determine the direction or position of a sound source.
In the embodiment of the present invention, three methods can be adopted for sound source localization: the first method is a high-resolution spectrum estimation method, a correlation matrix is required in calculation, the calculation amount is very large, and the positioning accuracy is not high compared with other methods; the second is a controllable beam forming method of maximum output power, which is obtained by using a weighting function; the third is a positioning method based on sound arrival time difference, which can determine the position of the sound source on the plane by using the time difference of the sound source transmitted to each microphone array and then calculating the angle. The embodiment of the invention does not set any limit to the sound source positioning technology used by the robot. And according to the position to be recorded, the robot acquires the target position through sound source positioning.
In one embodiment of the invention, the recording robot comprises a plurality of microphones, and the plurality of microphones are arranged around the recording robot. When the number of the microphones is multiple, the voice information collected by each microphone is combined into an audio file, and then the audio data collected by each microphone is separated out to perform sound source positioning.
And S102, planning a moving path according to the current position and the target position.
The path planning technology is an important part in the research field of mobile robots, and many international well-known companies have conducted intensive research on the path planning technology, so that various path planning technologies are born, and the path planning technologies can be divided into 2 categories in a large aspect: there are many branch technologies under the 2 broad categories of global path planning technology and local path planning technology, global path planning technology and local path planning technology. Because of the diversity of path planning techniques, the research and development focus of robot companies is different, and thus mobile robots produced by robot companies are also different. In one embodiment of the present invention, a robot, preferably a company, is used, and those skilled in the art will appreciate that the description is given by way of example only and should not be construed as a specific limitation to the present invention.
After the robot obtains the target position through sound source positioning, the robot plans a moving path according to the current position and the target position, and the moving path can be an optimal moving path with the shortest path.
And S103, controlling the recording robot to move to the target position according to the moving path.
And the recording robot moves according to the movement path planned in the step 102 until the recording robot reaches the target position and stops moving. If the user cancels the recording command during the movement of the robot, the robot returns the original path, stops moving or goes to another destination position according to the command of the user. In another situation of the embodiment of the present invention, if the robot encounters an obstacle during the movement according to the movement path, the movement path needs to be planned again in this situation, which will be described in detail in the following embodiment, and this embodiment is not described in detail.
And step S104, acquiring the environmental parameters of the target position.
The acquiring of the environmental parameter of the target position includes: and detecting the ambient volume of the target position.
Since the target location area may have various noises, it is necessary to detect the ambient volume of the target location. In an embodiment of the invention, the recording robot is provided with a decibel meter, and the decibel meter is used for detecting the environmental volume of the target position, so that the recording parameters of the recording robot are adjusted according to the detection result, and a better recording effect is obtained. It will be understood by those skilled in the art that the method of detecting the volume by using a decibel meter is merely an exemplary expression, and is not to be construed as a specific limitation of the present invention.
And S105, adjusting the recording parameters of the recording robot according to the environment parameters.
Optionally, adjust the recording parameter of recording robot according to the environmental parameter, include: and adjusting the recording time length, the recording format, the recording sound size and the recording quality of the recording robot according to the environment volume.
For example, in the case of low ambient sound volume, if the recording format can be selected as mp3 format only by performing ordinary recording, files in mp3 format occupy less storage and have good sound quality, and play is supported on various players, and the recording format in mp3 format can meet the daily general use.
When the storage is insufficient, the recording format of APE format can be used, and the compression ratio of the format is far lower than that of other formats. If the quality requirement for the audio file is very high, the audio recording format of the APE format can also be used, because the APE format can be truly lossless, and its satisfactory compression ratio and fast compression speed make it popular with many users.
Recording is performed in a quiet environment, and a recording format of the WAV format may be used if the recording quality is highly required. Under a Windows platform, WAV based on Pulse Code Modulation (PCM) coding is the best supported audio format, all audio software can perfectly support, and the WAV also is the preferred format for music editing and creation and is suitable for storing music materials because the WAV can meet the requirement of higher tone quality. Therefore, WAV based on PCM encoding is used as an intermediary format, often used in interconversion of other encodings, such as MP3 to WMA.
Optionally, adjust the recording parameter of recording robot according to the environmental parameter still includes: the noise of the microphone arranged opposite to the sound source is controlled to be reduced, and/or the recording shielding of the microphone not arranged opposite to the sound source is controlled, wherein the plurality of microphones are dispersedly arranged on the periphery of the recording robot.
When the number of the microphones is multiple, the voice information collected by each microphone is combined into an audio file, then the audio data collected by each microphone is separated, the noise of the microphone arranged opposite to the sound source is reduced, and/or the recording of the microphone not arranged opposite to the sound source is shielded, so that the signal-to-noise ratio is improved, the position of the sound source is subjected to key recording, and the recording effect is improved.
In the case where the ambient volume at the target location is too great, it is necessary to deal with the noise, and in this case, the recording sound can be appropriately turned up so that the recording can be recognized and heard. Controlling noise reduction of a microphone disposed opposite to the sound source, or controlling recording masking of a microphone not disposed opposite to the sound source.
The single microphone has obvious defects in the aspects of noise processing, sound source positioning and the like, and the voice communication quality is seriously influenced. The invention uses a plurality of microphones to form an array, and carries out space-time processing on signals from different directions, thereby more effectively realizing sound source positioning, improving the signal-to-noise ratio and greatly improving the recording effect.
And step S106, controlling the recording robot to record according to the recording parameters.
And generating a recording parameter setting instruction according to the recording parameters obtained in the step 105, and controlling the recording robot to record according to the recording parameters included in the recording parameter setting instruction when the robot receives the input recording parameter setting instruction.
Further, the control method further includes: and if an input recording parameter setting instruction is received, controlling the recording robot to record according to the recording parameters included by the recording parameter setting instruction. Through the setting, if the user does not need the robot to automatically record, the user can input a recording parameter setting instruction through the user terminal or the voice of the user, and the recording robot records the sound according to the recording parameter setting instruction input by the user. The recording robot can set recording parameters according to the instructions of the user besides setting the recording parameters according to the environment parameters, and interactivity and interestingness are improved.
Further, if an input recording parameter setting instruction is received, the recording robot is controlled to record according to the recording parameter included in the recording parameter setting instruction, and the method further includes: and receiving a recording parameter setting instruction input by a user terminal or a user voice.
A user can input recording parameters through voice so as to generate a recording parameter setting instruction; or inputting a recording parameter through a user terminal provided with a mobile phone application program so as to generate a recording parameter setting instruction; or inputting the recording parameters through a keyboard of the recording robot so as to generate a recording parameter setting instruction; or inputting recording parameters through a touch screen of the robot so as to generate a recording parameter setting instruction; or inputting recording parameters through a Personal Computer (PC) installed with an application program; or the recording parameters are sent to the server through a PC connected with the server, then the server generates a recording parameter setting instruction according to the recording parameters, and the recording parameter setting instruction is sent to the recording robot and received by the recording robot.
Optionally, after the recording is completed, the recording robot uploads the obtained recording file to a user terminal, such as a mobile phone or a PC, or uploads the obtained recording file to the user terminal synchronously during recording. Optionally, after the recording is completed, the robot may return to the target position according to the memorized moving path according to the control instruction of the user, or receive the control instruction of the user to perform sound source positioning again and go to the target position, or stay in place.
The recording robot in the embodiment of the invention is positioned to the target position through the sound source, reaches the target position through the planned moving path, acquires the environmental parameters of the target position, sets the recording parameters of the recording robot according to the environmental parameters, and controls the recording robot to record according to the recording parameters included in the recording parameter setting instruction. The embodiment of the invention combines the robot capable of moving autonomously with the recording equipment, and solves the defect that the traditional recording equipment can not move at any time and can only be fixed at a certain position. The recording robot can replace a human to go to some dangerous areas for recording. The recording robot can also adjust the position or adjust various parameters of the recording according to the environmental state of the target position, so that the recording is more intelligent and interesting.
In the foregoing embodiment, if the robot encounters an obstacle during moving according to the moving path, the moving path needs to be planned again in this case, referring to fig. 2, fig. 2 is a schematic flow chart of an implementation of another recording robot control method according to an embodiment of the present invention, in this embodiment, step S103 of the foregoing embodiment is specifically defined, where the recording robot is controlled to move to the target position according to the moving path, and the same points in this embodiment as in the foregoing embodiment are not repeated here, and only differences from the foregoing embodiment are described. As shown in fig. 2, step S103 includes steps S201-S202.
In step S201, an obstacle is detected to be encountered by the obstacle detection device.
Whether an obstacle exists in front of the recording robot or not is detected by arranging an obstacle detection device. The recording robot adopts a contact type obstacle detection device, and the detection range and sensitivity are enlarged by lengthening the detection arm. When the recording robot collides with a front obstacle, the signal end of the obstacle detection device returns to a high level, so that the existence of the obstacle in front can be known. The non-contact obstacle detecting device has no limitation on environmental conditions. The sound wave or certain ray or infrared ray is emitted by the non-contact obstacle detection device, when an obstacle is met, the sound wave or the ray or the infrared ray is reflected back and received by the sensor, and at the moment, the recording robot determines that the obstacle is found.
The non-contact obstacle detection device adopted in one embodiment of the invention can avoid damage to a recording machine and prevent the recording from being out of control.
Furthermore, in the embodiment of the invention, the distance sensor can be applied to the obstacle detection device, so that the recording robot can not only detect the existence of the obstacle, but also detect the distance from the obstacle. It is to be understood that this description is made only by way of example and not as a specific limitation on the invention.
And step S202, replanning a moving path, and controlling the recording robot to move according to the replanned moving path until the recording robot reaches the target position.
And after the obstacle detection device detects that an obstacle is encountered, the robot re-plans a moving path according to the current position and the target position, and controls the recording robot to move according to the re-planned moving path until the recording robot reaches the target position.
In the embodiment of the invention, when the robot encounters an obstacle in the moving process, the obstacle can be automatically avoided, and the optimal moving path is re-planned, so that the robot can quickly reach the target position under the condition of ensuring the nondestructive safety.
Fig. 3 is a schematic diagram of a control device of a recording robot according to an embodiment of the present invention, including: a target position obtaining unit 31, a path planning unit 32, a movement control unit 33, an environment parameter obtaining unit 34, a recording parameter adjusting unit 35, and a recording control unit 36.
A target position obtaining unit 31 for obtaining a target position by sound source localization.
And a path planning unit 32, configured to plan a moving path according to the current position and the target position.
And a movement control unit 33, configured to control the recording robot to move to the target position according to the movement path.
An environment parameter acquiring unit 34, configured to acquire an environment parameter of the target location.
And the recording parameter adjusting unit 35 is used for adjusting the recording parameters of the recording robot according to the environment parameters.
And the recording control unit 36 is used for controlling the recording robot to record according to the recording parameters.
For parts which are not described or recited in detail in the above embodiments, reference may be made to the description of other embodiments.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 4 is a schematic diagram of a recording robot according to an embodiment of the present invention. As shown in fig. 4, a recording robot 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. The processor 40, when executing the computer program 42, implements the steps in the various method embodiments described above, such as the steps 101 to 106 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 31 to 36 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the one recording robot 6.
The recording robot 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of a recording robot 4 and is not intended to limit a recording robot 4 and may include more or fewer components than shown, or some combination of components, or different components, for example, the recording robot may also include input and output devices, network access devices, buses, decibel meters or microphones, obstacle detection devices, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the recording robot 4, such as a hard disk or a memory of the recording robot 4. The memory 41 may also be an external storage device of the recording robot 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the recording robot 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the recording robot 4. The memory 41 is used for storing the computer program and other programs and data required by the recording robot. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.