Voice playback method, device, electronic device and computer-readable storage medium
By obtaining the equipment posture information and position information of the voice playback device, and automatically adjusting the reading role and quality, the problem of low switching efficiency of reading roles in the existing technology is solved and the user experience is improved.
Patent Information
- Application Number
- CN202210164652.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-02-22
AI Technical Summary
In the prior art, electronic devices have low efficiency in reading role switching in the reading mode, which affects the user experience.
By obtaining the device posture information and device position information of the voice playback device, the reading character and target reading quality are automatically determined, and the voice to be played is generated based on this to automatically adjust the reading quality.
Improve the efficiency of switching roles in reading aloud and improve user experience.
Smart Images

Figure CN114596835B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of speech synthesis technology, and specifically to a speech playback method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous development of Internet technology, more and more users are getting used to using electronic devices to read books. When using electronic devices to read e-books, users can perform personalized settings, such as setting the e-book to a reading mode.
[0003] In the related art, when a user sets an e-book to a reading mode, the electronic device reads the e-book according to a default reading role for the user to listen to. During the reading process of the e-book, the user can manually switch the reading role of the e-book. However, in the process of implementing the embodiment of the present invention, the inventor found that: in the related art, the user can only switch the reading role of the e-book manually, and the switching efficiency is low, which affects the user experience. Summary of the invention
[0004] In view of the above problems, the embodiments of the present invention provide a voice playback method, device, electronic device and computer-readable storage medium, which are used to solve the problem of low efficiency of switching reading roles in the prior art.
[0005] According to one aspect of an embodiment of the present invention, a voice playback method is provided, wherein the method comprises:
[0006] Acquire device posture information of a voice playback device, and determine a reading role corresponding to the voice playback device according to the device posture information;
[0007] Acquire device location information of the voice playback device, and determine a target reading quality corresponding to the reading role according to the device location information;
[0008] The voice to be played is generated based on the target reading quality, and the voice to be played is sent to the voice playing device so that the voice playing device plays the voice to be played.
[0009] In an optional manner, the device posture information includes the azimuth of the voice playback device, and the device location information includes the altitude of the voice playback device.
[0010] In an optional manner, determining the reading role corresponding to the voice playback device according to the device posture information includes:
[0011] Determining a first ratio of the azimuth angle to a first preset threshold;
[0012] Rounding down the first ratio to obtain a first rounding result;
[0013] A remainder after dividing the first rounding result by a second preset threshold is determined, and a reading role corresponding to the remainder is determined as the reading role corresponding to the voice playback device.
[0014] In an optional manner, determining the target reading quality corresponding to the reading role according to the device location information includes:
[0015] Determining a second ratio of the altitude to a third preset threshold;
[0016] Rounding down the second ratio to obtain a second rounding result;
[0017] The second rounding result is added to a fourth preset threshold, and the target reading quality corresponding to the reading role is determined according to the result of the addition.
[0018] In an optional manner, before acquiring the device posture information of the voice playback device and determining the reading role corresponding to the voice playback device according to the device posture information, the method further includes:
[0019] Acquiring state change information of the voice playback device, wherein the state change information includes posture change information and / or position change information of the voice playback device;
[0020] Determining whether the voice playback device meets the sound effect update triggering condition according to the state change information;
[0021] If the voice playback device meets the sound effect update triggering condition, the step of obtaining the device posture information of the voice playback device and determining the reading role corresponding to the voice playback device according to the device posture information is performed.
[0022] In an optional manner, the sound effect update triggering condition includes:
[0023] The azimuth angle change of the voice playback device exceeds a fifth preset threshold; and / or, the altitude change of the voice playback device exceeds a sixth preset threshold; and / or, the administrative area where the voice playback device is located changes.
[0024] In an optional manner, the device posture information includes the pitch angle of the voice playback device; and the device position information includes the moving speed of the voice playback device.
[0025] According to another aspect of an embodiment of the present invention, a voice playback device is provided, the device comprising:
[0026] A first determination module is used to obtain device posture information of a voice playback device, and determine a reading role corresponding to the voice playback device according to the device posture information;
[0027] A second determination module is used to obtain device location information of the voice playback device, and determine the target reading quality corresponding to the reading role according to the device location information;
[0028] The playing module is used to generate the voice to be played based on the target reading quality, and send the voice to be played to the voice playing device so that the voice playing device plays the voice to be played.
[0029] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0030] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the above-mentioned voice playing method.
[0031] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and when the executable instruction is executed on an electronic device, the electronic device executes the operation of the above-mentioned voice playback method.
[0032] In an embodiment of the present invention, before generating the voice to be played, the device posture information of the voice playback device is first obtained, and the reading role corresponding to the voice playback device is determined according to the device posture information of the voice playback device, and different device posture information can correspond to different reading roles; then the device position information of the voice playback device is obtained, and the target reading quality corresponding to the reading role is determined according to the device position information of the voice playback device, and different device position information can correspond to different reading qualities; finally, the voice to be played is generated based on the target reading quality, and the voice to be played is sent to the voice playback device, so that the voice playback device can play the voice to be played. It can be seen that the embodiment of the present invention can automatically adjust the reading quality of the voice playback device according to the device posture information and device position information of the voice playback device, thereby improving the switching efficiency of the reading quality of the voice playback device.
[0033] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation mode of the present invention is specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0035] Figure 1 A schematic diagram showing a flow chart of a voice playback method provided by an embodiment of the present invention;
[0036] Figure 2 A schematic diagram showing the structure of a voice playback device provided by an embodiment of the present invention is shown;
[0037] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0038] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0039] Figure 1 The flowchart of the voice playing method of the embodiment of the present invention is shown, the method is applied to the server and executed by the electronic device. The memory of the electronic device is used to store at least one executable instruction, and the executable instruction enables the processor of the electronic device to execute the operation of the above-mentioned voice playing method.
[0040] like Figure 1 As shown, the method comprises the following steps:
[0041] Step 110: Acquire device posture information of a voice playback device, and determine a reading role corresponding to the voice playback device according to the device posture information.
[0042] Among them, the voice playback device is a terminal device used by the user, for example, it can be a mobile phone, a tablet computer, a laptop computer, etc. The voice playback device includes a speaker and can play voice. An application for reading e-books is installed on the voice playback device. The user can read the e-books of interest according to the application, and can also set the e-books of interest to the reading mode so that the voice playback device plays the e-books in voice. The user can turn on the TTS (Text To Speech) function on the display page of the e-book to trigger the voice playback device to play the e-book in voice. The voice playback device generally plays voice based on the default reading role, and the user can also adjust the reading role of the e-book according to preference. After obtaining the device posture information of the voice playback device, the present invention can automatically determine the reading role corresponding to the voice playback device based on the device posture information.
[0043] In an optional manner, the device posture information of the voice playback device includes the azimuth of the voice playback device. The gyroscope of the voice playback device can detect the azimuth of the voice playback device in real time, and report the azimuth of the voice playback device to the server, and the server determines the reading role corresponding to the voice playback device according to the azimuth of the voice playback device. When determining the reading role corresponding to the voice playback device according to the device posture information of the voice playback device, the first ratio of the azimuth of the voice playback device to the first preset threshold can be first determined; then the first ratio is rounded down to obtain a first rounding result; finally, the remainder after the first rounding result is divided by the second preset threshold is determined, and the reading role corresponding to the remainder is determined as the reading role corresponding to the voice playback device. For example, when a user holds a voice playback device in a vertical state, the ground where the user is located is a two-dimensional plane, and the user rotates one circle starting from the north direction, then the azimuth of the voice playback device changes in the range of 0° to 360°. The first preset threshold is 45, and the second preset threshold is 8. The two-dimensional plane can be divided into eight direction intervals: east, south, west, north, northeast, southeast, southwest, and northwest. That is, the azimuth transformation range is divided into eight intervals with 45° as the azimuth interval range, namely, [0-45°], [45°-90°], [90°-135°], [135-180°], [180°-225°], [225°-270°], [270°-315°] ], [315°~360°], corresponding to [Big Star 0, High Quality 0, Normal Quality 0], [Big Star 1, High Quality 1, Normal Quality 1], [Big Star 2, High Quality 2, Normal Quality 2], [Big Star 3, High Quality 3, Normal Quality 3], [Big Star 4, High Quality 4, Normal Quality 4], [Big Star 5, High Quality 5, Normal Quality 5], [Big Star 6, High Quality 6, Normal Quality 6], [Big Star 7, High Quality 7, Normal Quality 7] respectively. If the azimuth angle of the voice playback device is 335°, the first ratio of the azimuth angle of the voice playback device to the first preset threshold is 335 / 45=7.44, the first ratio is rounded down to obtain a first rounded result of 7, and the remainder after dividing the first rounded result by the second preset threshold is 7, and the reading role corresponding to the voice playback device is [big star 7, high quality 7, ordinary quality 7]; if the azimuth angle of the voice playback device is 360°, the first ratio of the azimuth angle of the voice playback device to the first preset threshold is 360 / 45=8, the first ratio is rounded down to obtain a first rounded result of 8, and the remainder after dividing the first rounded result by the second preset threshold is 0, and the reading role corresponding to the voice playback device is [big star 0, high quality 0, ordinary quality 0].
[0044] The reading role c can be expressed by the following formula, where θ represents the azimuth angle of the voice playback device.
[0045]
[0046] Furthermore, the device posture information of the voice playback device may also include the pitch angle of the voice playback device, and the reading role corresponding to the voice playback device may be determined based on the pitch angle of the voice playback device. The specific process is the same as determining the reading role corresponding to the voice playback device through the azimuth angle, and will not be repeated in this embodiment.
[0047] Step 120: Acquire device location information of the voice playback device, and determine a target reading quality corresponding to the reading role according to the device location information.
[0048] Among them, the device location information of the voice playback device can reflect the static location information and motion state information of the voice playback device. The device location information of the voice playback device includes, for example, the altitude of the voice playback device. When determining the target reading quality corresponding to the reading role according to the device location information, first determine the second ratio of the altitude to the third preset threshold; then round down the second ratio to obtain a second rounding result; finally, add the second rounding result to the fourth preset threshold, and determine the target reading quality corresponding to the reading role according to the result of the addition. For example, the reading role corresponding to the voice playback device is [Big Star 7, High Quality 7, Ordinary Quality 7], the third preset threshold is 1000, the fourth preset threshold is 1, and the altitude is divided into 3 altitude intervals [0-1000], [1000-2000] and [2000-3000] at an altitude interval of 1000 meters. If the altitude of the voice playback device is 447 meters, the second ratio of the altitude to the third preset threshold is 447 / 1000=0.447, the second ratio is rounded down to get a second rounding result of 0, the result of adding the second rounding result to the fourth preset threshold is 1, then the target reading quality corresponding to the reading role is Big Star 7; if the altitude of the voice playback device is 1107 meters, the second ratio of the altitude to the third preset threshold is 1107 / 1000=1.107, the second ratio is rounded down to get a second rounding result of 1, the result of adding the second rounding result to the fourth preset threshold is 2, then the target reading quality corresponding to the reading role is High Quality 7; if the altitude of the voice playback device is 1107 meters, the second ratio of the altitude to the third preset threshold is 1107 / 1000=1.107, the second ratio is rounded down to get a second rounding result of 1, the result of adding the second rounding result to the fourth preset threshold is 2, then the target reading quality corresponding to the reading role is High Quality 7; If the altitude of the voice playback device is 2857 meters, the second ratio of the altitude to the third preset threshold is 2857 / 1000=2.857, the second ratio is rounded down to get a second rounding result of 2, the second rounding result and the fourth preset threshold are added to get a result of 3, then the target reading quality corresponding to the reading role is ordinary quality 7; if the altitude of the voice playback device is 3000 meters, the second ratio of the altitude to the third preset threshold is 3000 / 1000=3, the second ratio is rounded down to get a second rounding result of 3, the second rounding result and the fourth preset threshold are added to get a result of 4, 4 can be corrected to the maximum value of 3, that is, the target reading quality corresponding to the reading role is determined to be ordinary quality 7. It should be noted that the big star quality generally requires a high-level signal coverage strength, the high quality generally requires a medium-level signal coverage strength, and the ordinary quality generally requires a low-level signal coverage strength. The high-altitude areas [2000-3000] generally have an underdeveloped economy and limited signal coverage, so they are prioritized to match ordinary quality; the medium-altitude areas [1000-2000] generally have a relatively developed economy and good signal coverage, so they are prioritized to match high quality; the low-altitude areas [0-1000] generally have a very developed economy and very good signal coverage, so they are prioritized to match superstar quality.
[0049] Furthermore, the target reading quality q corresponding to the reading role can be expressed by the following formula, where r represents the altitude of the voice playback device.
[0050]
[0051] In an optional manner, in order to avoid frequent switching of the target reading quality of the voice playback device, the present invention can pre-set the sound effect update trigger condition of the voice playback device before determining the reading role of the voice playback device. Further, before obtaining the device posture information of the voice playback device and determining the reading role corresponding to the voice playback device according to the device posture information, the state change information of the voice playback device can be obtained in advance, and the state change information of the voice playback device includes the posture change information and / or position change information of the voice playback device; determine whether the voice playback device meets the sound effect update trigger condition according to the state change information; if the voice playback device meets the sound effect update trigger condition, then obtain the device posture information of the voice playback device, and determine the reading role corresponding to the voice playback device according to the device posture information. For example, the sound effect update trigger condition includes, for example, the azimuth angle change of the voice playback device exceeds the fifth preset threshold; and / or, the altitude change of the voice playback device exceeds the sixth preset threshold; and / or, the administrative area where the voice playback device is located changes. The azimuth angle and altitude of the voice playback device can correspond to the polar angle and polar radius in the polar coordinate system, respectively, so as to uniquely determine the target reading quality of the voice playback device.
[0052] Furthermore, the device location information of the voice playback device may include the moving speed of the voice playback device, and the target reading quality corresponding to the reading role may be determined based on the moving speed of the voice playback device. The specific process is the same as determining the target reading quality corresponding to the reading role by altitude, and will not be repeated in this embodiment.
[0053] Step 130: Generate a to-be-played voice based on the target reading quality, and send the to-be-played voice to the voice playback device so that the voice playback device plays the to-be-played voice.
[0054] Among them, according to the text on the voice playback device, the voice to be played corresponding to the text can be generated according to the target reading quality, and the voice to be played is sent to the voice playback device for playback. It should be noted that if the target reading quality is a lower level of quality, the corresponding voice to be played can also be generated by the voice playback device itself, and the present invention does not limit this.
[0055] In an embodiment of the present invention, before generating the voice to be played, the device posture information of the voice playback device is first obtained, and the reading role corresponding to the voice playback device is determined according to the device posture information of the voice playback device, and different device posture information can correspond to different reading roles; then the device position information of the voice playback device is obtained, and the target reading quality corresponding to the reading role is determined according to the device position information of the voice playback device, and different device position information can correspond to different reading qualities; finally, the voice to be played is generated based on the target reading quality, and the voice to be played is sent to the voice playback device, so that the voice playback device can play the voice to be played. It can be seen that the embodiment of the present invention can automatically adjust the reading quality of the voice playback device according to the device posture information and device position information of the voice playback device, thereby improving the switching efficiency of the reading quality of the voice playback device.
[0056] Figure 2 FIG. 1 is a schematic diagram showing the structure of a voice playback device according to an embodiment of the present invention. Figure 2 As shown, the device 300 includes: a first determination module 310 , a second determination module 320 and a playing module 330 .
[0057] Among them, the first determination module 310 is used to obtain the device posture information of the voice playback device, and determine the reading role corresponding to the voice playback device according to the device posture information; the second determination module 320 is used to obtain the device position information of the voice playback device, and determine the target reading quality corresponding to the reading role according to the device position information; the playback module 330 is used to generate the voice to be played based on the target reading quality, and send the voice to be played to the voice playback device, so that the voice playback device can play the voice to be played.
[0058] In an optional manner, the device posture information includes the azimuth of the voice playback device, and the device location information includes the altitude of the voice playback device.
[0059] In an optional manner, the first determining module 310 is used to:
[0060] Determining a first ratio of the azimuth angle to a first preset threshold;
[0061] Rounding down the first ratio to obtain a first rounding result;
[0062] A remainder after dividing the first rounding result by a second preset threshold is determined, and a reading role corresponding to the remainder is determined as the reading role corresponding to the voice playback device.
[0063] In an optional manner, the second determining module 320 is used to:
[0064] Determining a second ratio of the altitude to a third preset threshold;
[0065] Rounding down the second ratio to obtain a second rounding result;
[0066] The second rounding result is added to a fourth preset threshold, and the target reading quality corresponding to the reading role is determined according to the result of the addition.
[0067] In an optional manner, the apparatus 300 further includes a third determining module, configured to:
[0068] The first determination module 310 obtains device posture information of the voice playback device, and before determining the reading role corresponding to the voice playback device according to the device posture information, obtains state change information of the voice playback device, wherein the state change information includes posture change information and / or position change information of the voice playback device;
[0069] Determining whether the voice playback device meets the sound effect update triggering condition according to the state change information;
[0070] If the voice playback device meets the sound effect update triggering condition, the first determination module 310 obtains the device posture information of the voice playback device, and determines the reading role corresponding to the voice playback device according to the device posture information.
[0071] In an optional manner, the sound effect update triggering condition includes:
[0072] The azimuth angle change of the voice playback device exceeds a fifth preset threshold; and / or, the altitude change of the voice playback device exceeds a sixth preset threshold; and / or, the administrative area where the voice playback device is located changes.
[0073] In an optional manner, the device posture information includes the pitch angle of the voice playback device; and the device position information includes the moving speed of the voice playback device.
[0074] In an embodiment of the present invention, before generating the voice to be played, the device posture information of the voice playback device is first obtained, and the reading role corresponding to the voice playback device is determined according to the device posture information of the voice playback device, and different device posture information can correspond to different reading roles; then the device position information of the voice playback device is obtained, and the target reading quality corresponding to the reading role is determined according to the device position information of the voice playback device, and different device position information can correspond to different reading qualities; finally, the voice to be played is generated based on the target reading quality, and the voice to be played is sent to the voice playback device, so that the voice playback device can play the voice to be played. It can be seen that the embodiment of the present invention can automatically adjust the reading quality of the voice playback device according to the device posture information and device position information of the voice playback device, thereby improving the switching efficiency of the reading quality of the voice playback device.
[0075] Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0076] like Figure 3 As shown, the electronic device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0077] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned embodiment of the voice playback method.
[0078] Specifically, the program 410 may include program code including computer executable instructions.
[0079] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0080] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0081] Program 410 can be specifically called by processor 402 to enable the electronic device to perform the following operations:
[0082] Acquire device posture information of a voice playback device, and determine a reading role corresponding to the voice playback device according to the device posture information;
[0083] Acquire device location information of the voice playback device, and determine a target reading quality corresponding to the reading role according to the device location information;
[0084] The voice to be played is generated based on the target reading quality, and the voice to be played is sent to the voice playing device so that the voice playing device plays the voice to be played.
[0085] In an optional manner, the device posture information includes the azimuth of the voice playback device, and the device location information includes the altitude of the voice playback device.
[0086] In an optional manner, the program 410 is called by the processor 402 to enable the electronic device to perform the following operations:
[0087] Determining a first ratio of the azimuth angle to a first preset threshold;
[0088] Rounding down the first ratio to obtain a first rounding result;
[0089] A remainder after dividing the first rounding result by a second preset threshold is determined, and a reading role corresponding to the remainder is determined as the reading role corresponding to the voice playback device.
[0090] In an optional manner, the program 410 is called by the processor 402 to enable the electronic device to perform the following operations:
[0091] Determining a second ratio of the altitude to a third preset threshold;
[0092] Rounding down the second ratio to obtain a second rounding result;
[0093] The second rounding result is added to a fourth preset threshold, and the target reading quality corresponding to the reading role is determined according to the result of the addition.
[0094] In an optional manner, the program 410 is called by the processor 402 to enable the electronic device to perform the following operations:
[0095] Before acquiring the device posture information of the voice playback device and determining the reading role corresponding to the voice playback device according to the device posture information, acquiring state change information of the voice playback device, wherein the state change information includes posture change information and / or position change information of the voice playback device;
[0096] Determining whether the voice playback device meets the sound effect update triggering condition according to the state change information;
[0097] If the voice playback device meets the sound effect update triggering condition, the device posture information of the voice playback device is obtained, and the reading role corresponding to the voice playback device is determined according to the device posture information.
[0098] In an optional manner, the sound effect update triggering condition includes:
[0099] The azimuth angle change of the voice playback device exceeds a fifth preset threshold; and / or, the altitude change of the voice playback device exceeds a sixth preset threshold; and / or, the administrative area where the voice playback device is located changes.
[0100] In an optional manner, the device posture information includes the pitch angle of the voice playback device; and the device position information includes the moving speed of the voice playback device.
[0101] In an embodiment of the present invention, before generating the voice to be played, the device posture information of the voice playback device is first obtained, and the reading role corresponding to the voice playback device is determined according to the device posture information of the voice playback device, and different device posture information can correspond to different reading roles; then the device position information of the voice playback device is obtained, and the target reading quality corresponding to the reading role is determined according to the device position information of the voice playback device, and different device position information can correspond to different reading qualities; finally, the voice to be played is generated based on the target reading quality, and the voice to be played is sent to the voice playback device, so that the voice playback device can play the voice to be played. It can be seen that the embodiment of the present invention can automatically adjust the reading quality of the voice playback device according to the device posture information and device position information of the voice playback device, thereby improving the switching efficiency of the reading quality of the voice playback device.
[0102] An embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores at least one executable instruction. When the executable instruction is executed on an electronic device, the electronic device executes the voice playback method in any of the above method embodiments.
[0103] The embodiment of the present invention provides a voice playing device, which is used to execute the above-mentioned voice playing method.
[0104] An embodiment of the present invention provides a computer program, which can be called by a processor to enable an electronic device to execute the voice playback method in any of the above method embodiments.
[0105] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed on a computer, the computer executes the voice playback method in any of the above method embodiments.
[0106] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description made to specific languages above is for disclosing the best mode of the present invention.
[0107] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0108] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than those expressly recited in each claim.
[0109] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0110] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A voice playing method, characterized in that: The method comprises: Acquire device posture information of a voice playback device, and determine a reading role corresponding to the voice playback device according to the device posture information; Acquire device location information of the voice playback device, and determine a target reading quality corresponding to the reading role according to the device location information; Generate a voice to be played based on the target reading quality, and send the voice to be played to the voice playback device, so that the voice playback device plays the voice to be played; the device posture information includes the azimuth of the voice playback device, and the device location information includes the altitude of the voice playback device; and The device posture information includes the pitch angle of the voice playback device, and the device position information includes the moving speed of the voice playback device.
2. The method according to claim 1, characterized in that: Determining the reading role corresponding to the voice playback device according to the device posture information includes: Determining a first ratio of the azimuth angle to a first preset threshold; Rounding down the first ratio to obtain a first rounding result; A remainder after dividing the first rounding result by a second preset threshold is determined, and a reading role corresponding to the remainder is determined as the reading role corresponding to the voice playback device.
3. The method according to claim 2, characterized in that The determining the target reading quality corresponding to the reading role according to the device location information includes: Determining a second ratio of the altitude to a third preset threshold; Rounding down the second ratio to obtain a second rounding result; The second rounding result is added to a fourth preset threshold, and the target reading quality corresponding to the reading role is determined according to the result of the addition.
4. The method according to claim 1, characterized in that: Before acquiring the device posture information of the voice playback device and determining the reading role corresponding to the voice playback device according to the device posture information, the method further includes: Acquiring state change information of the voice playback device, wherein the state change information includes posture change information and / or position change information of the voice playback device; Determining whether the voice playback device meets the sound effect update triggering condition according to the state change information; If the voice playback device meets the sound effect update triggering condition, the step of obtaining the device posture information of the voice playback device and determining the reading role corresponding to the voice playback device according to the device posture information is performed.
5. The method according to claim 4, characterized in that The sound effect update triggering conditions include: The azimuth angle change of the voice playback device exceeds a fifth preset threshold; and / or, the altitude change of the voice playback device exceeds a sixth preset threshold; and / or, the administrative area where the voice playback device is located changes.
6. A voice playing device, characterized in that: The device comprises: A first determination module is used to obtain device posture information of a voice playback device, and determine a reading role corresponding to the voice playback device according to the device posture information; A second determination module is used to obtain device location information of the voice playback device, and determine the target reading quality corresponding to the reading role according to the device location information; A playback module, used for generating a voice to be played based on the target reading quality, and sending the voice to be played to the voice playback device, so that the voice playback device plays the voice to be played; The device posture information includes the azimuth of the voice playback device, and the device location information includes the altitude of the voice playback device; and The device posture information includes the pitch angle of the voice playback device, and the device position information includes the moving speed of the voice playback device.
7. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the voice playback method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the electronic device, the electronic device executes the operation of the voice playback method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and apparatus for configuring stereo output, audio playing device and mobile terminal
CN107071655A
Sound effect adjustment method and device, electronic equipment and storage medium
CN112738705A