WO2013178129A1 - Voice scrawling implementation method, device and terminal - Google Patents
Voice scrawling implementation method, device and terminal Download PDFInfo
- Publication number
- WO2013178129A1 WO2013178129A1 PCT/CN2013/078773 CN2013078773W WO2013178129A1 WO 2013178129 A1 WO2013178129 A1 WO 2013178129A1 CN 2013078773 W CN2013078773 W CN 2013078773W WO 2013178129 A1 WO2013178129 A1 WO 2013178129A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- pixel
- value
- graffiti
- voice
- rgb value
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/06—Transformation of speech into a non-audible representation, e.g. speech visualisation or speech processing for tactile aids
- G10L21/10—Transforming into visible information
Definitions
- the invention belongs to the field of terminal products, and more specifically relates to a method, a device and a terminal for realizing a voice graffiti. Background technique
- the embodiment of the invention discloses a method, a device and a terminal for implementing a voice graffiti, which are used for solving the problem that the user experience is not high due to the graffiti method limited to text or writing.
- a method for implementing a voice graffiti including: a method for implementing a voice graffiti, applied to a terminal with a display screen, including acquiring a piece of audio data; according to a preset audio frame and a Corresponding relationship of display screen pixels acquires pixel points on the display screen corresponding to each audio frame of the audio data; color processing the pixel points; and placing the processed pixel points on the display Displayed on the screen, the audio data is converted into a pair of graffiti works.
- the correspondence between the audio frame and the pixel of the display area of the display screen is at least one of the following: when the number of pixels of the display area is greater than or equal to the maximum quantization value of the audio frame, one audio frame corresponds to One or more display area pixel points; when the number of display area pixel points is smaller than the maximum quantization value of the audio frame, one or more audio frames correspond to one display area pixel point.
- the color processing of the pixel point comprises: acquiring a current RGB value of the pixel point; calling a random function of the system to calculate a random value within a preset range; The RGB value and the random value calculate a new RGB value for the pixel and assign the new RGB value to the pixel.
- the calculating the new RGB value of the pixel point according to the current RGB value and the random value comprises: determining whether the flag bit of the pixel point is 0 or 1 and obtaining the first judgment a result; when the first determination result is 0, adding the current RGB value to the random value; when the first determination result is 1, the current RGB value is compared with the random value Less.
- the assignment of the flag bit is converted according to a new RGB value of the pixel point, and when a new RGB value of the pixel point is added by the current RGB value to the random value to reach a first threshold, The assignment of the flag bit is set to 1, and the value of the flag bit is set to 0 when the new RGB value of the pixel point is subtracted from the random value by the current value to a second threshold.
- the method for implementing the voice graffiti further comprises: placing the audio data into a storage unit; and outputting the audio data in units of the audio frame.
- the method for implementing the voice graffiti further includes: determining whether the storage unit is empty, and obtaining a third determination result;
- the third result is that when the storage unit is not empty, the color processing of the pixel is repeatedly performed until the processed pixel is displayed on the display area, so that the audio data is converted into A pair of graffiti works.
- a device for implementing voice graffiti for a terminal with a display screen, including: a first acquiring module configured to acquire a piece of audio data; and a corresponding module configured to be preset according to a corresponding relationship between the audio frame and the display pixel pixel to acquire a pixel on the display screen corresponding to each audio frame of the audio data; a processing module configured to perform color processing on the pixel point; And a display module, configured to display the processed pixel on the display screen, so that the audio data is converted into a pair of graffiti works.
- the processing module includes: a second acquiring module, configured to acquire a current RGB value of the pixel point; and a calling module configured to calculate a random value in a preset range by calling a random function of the system; And setting to calculate a new RGB value of the pixel according to the current RGB value and the random value, and assign the new RGB value to the pixel.
- the calculation module includes: a first determining module, configured to determine whether the flag of the pixel is assigned a value of 0 or 1, and obtain a first determination result; and the adding module is set to be in the When the judgment result is 0, the current RGB value is added to the random value; and the subtraction module is configured to set the current RGB value and the random value when the first determination result is 1. Subtraction.
- the voice graffiti implementation device further includes: a storage module configured to put the audio data into a storage unit; and an output module configured to output the audio data in units of the audio frame.
- a terminal comprising the above-described implementation device for voice coating.
- a piece of speech of a user or a piece of audio of other language sources is collected, and a random graffiti work is presented.
- the user can also fix a certain sound frequency to speak, then the display will be displayed.
- a picture work in a section enhances the user experience of the terminal.
- FIG. 1 is a flow chart showing a method for implementing voice graffiti according to an embodiment of the present invention
- FIG. 2 is a schematic diagram showing the distribution of pixel points on a display screen according to an embodiment of the present invention
- FIG. 3 is a flowchart of an audio data collection method according to an embodiment of the present invention.
- Figure 4 is a flow chart showing the operation of the voice graffiti system according to the embodiment of the present invention
- Figure 5 is a block diagram showing the structure of the voice graffiti implementation device according to the embodiment of the present invention.
- FIG. 1 is a flow chart showing a method for implementing voice graffiti according to an embodiment of the present invention.
- the implementation of the voice graffiti is applied to a terminal with a display, which may include the following steps:
- d displaying the processed pixel on the display screen to convert the audio data into a graffiti artwork.
- the obtaining of a piece of audio data in step a may be a speech of the user, and the audio collection system of the terminal with the display screen may continuously collect the speech in the real-time, of course, the audio
- the source of the data may be many, not limited to a speech by the user, for example, may be a piece of music, a song sung by a singer, etc., and the graffiti works can be formed by the embodiment of the present invention; in step b , is to convert the audio data of the above set into pixel points on the display screen, the specific method is to convert the audio data into pixel points on the display screen by presetting the relationship between the audio frame of the audio data and the pixel of the display screen.
- a graffiti image can be formed on the screen of a mobile phone or other terminal by means of voice, thereby improving the user experience of the user.
- the correspondence between the audio frame and the pixel of the display screen is: the number of pixels of the display screen is an integer multiple or 1/2 times the maximum quantization value of the audio frame.
- FIG. 2 is a schematic diagram showing the distribution of pixel points on a display screen according to an embodiment of the invention.
- the screen of the standard configuration is usually 480*800 resolution, that is, the total number of such screens is 38,400. Pixels.
- a pixel of 480*800 is used to simulate the pixel points of the screen, each grid represents a pixel on the screen, and then sorted from top to bottom, left to right, and the top left is 0, the rightmost Below is 38400.
- the collection of audio data is collected by the microphone of the mobile terminal.
- the audio data is collected once in 20 ms, and each acquisition includes 160 audio frames, and each audio frame is 2 bytes, that is, 16 Bit. According to the conversion, each audio frame can be represented by an integer of 0-65535.
- the audio frame is 0-65535, for the sake of convenience, it is not necessary to use all the screen pixels, and 32768 pixels of the design can be taken. This is exactly half of the maximum value of the audio frame. In this way, the correspondence between the audio frame and the pixel of the display screen can be set in advance to correspond to one screen pixel point every two digits of the audio frame value.
- the value of the audio frame collected each time is different because the voice of the person speaks differently.
- it can correspond to different screen pixels, and finally form different graffiti pictures.
- the color processing of the pixel point comprises: acquiring a current RGB value of the pixel point; calling a random function of the system to calculate a random value within a preset range; according to the current RGB value and the The random value calculates the new RGB value of the pixel.
- the audio frame to pixel point conversion can be completed by the previous embodiment.
- color processing is performed on each pixel.
- the weak index standard also known as the color index.
- the gradation of the various screens is different, and the 1600W color gradation currently used in the market.
- the general mobile phone display shows colors in RGB, from pure black #000000, to pure white #FFFFFF, and the corresponding integer is 0-16777215.
- the display screen with 32,768 pixels is still taken as an example.
- the initial state of the RGB color of each pixel is set to #000000, that is, it is pure black at the beginning.
- the initial RGB value of the pixel is 0.
- a random function is called to calculate a value within 0-50000, and this value is added to the initial value of RGB to form a new RGB value.
- the value of 50000 here can be dynamically adjusted during system design, or it can be 500000 or other values, which can be adjusted according to the effect. If a pixel is corresponding to multiple times, the accumulated value may exceed iFFFFFF, then start subtracting the value of ⁇ ????? minus the current RGB value of the pixel as the new point of the pixel. The RGB value, so looping, until the speech is finished.
- calculating the new RGB value of the pixel point according to the current RGB value and the random value comprises: determining whether the flag bit of the pixel point is 0 or 1 and obtaining a first determination result; When the first determination result is 0, the current RGB value is added to the random value; when the first determination result is 1, the current RGB value is subtracted from the random value.
- one pixel point may be corresponding to more than one audio frame, and the current RGB value and random value of the pixel point are used at this time.
- the flag set by the pixel that is, after the random value is calculated, the flag is read, and the flag can be set to B, if B is 0 Add the random value to the current RGB value of the pixel. If B is 1, subtract the random value from the current RGB value of the pixel, thus obtaining a new RGB value for one pixel.
- the assignment of the flag bit is converted according to a new RGB value of the pixel point, and when a new RGB value of the pixel point is added by the current RGB value to the random value to reach a first threshold, The assignment of the flag bit is set to 1, and the value of the flag bit is set to 0 when the new RGB value of the pixel point is subtracted from the random value by the current RGB value to reach a second threshold.
- the first threshold may be set to #FFFFFF (16777215), and the second threshold is 0. That is, if the new pixel value is less than or equal to 0, then the ⁇ B flag bit B is set to 0. And set this new pixel to 0; if the pixel value is greater than or equal to #FFFFFF ( 16777215 ), set flag B to 1, and set the new pixel value to #FFFFFF.
- a color processing method of a pixel is set, a random value is calculated by a random function, and a new RGB value of the pixel is obtained by adding or subtracting a current RGB value of the pixel, and The new RGB value is assigned to the pixel and displayed on the display screen, but the color processing method is not unique, and the random value interval calculated by calling the random function of the system can also be adjusted according to the actual effect. Therefore, any method that allows processing of pixel color is encompassed within the scope of the present invention.
- the method for implementing the voice graffiti further comprises: putting the audio data into a storage unit; and outputting the audio data in units of the audio frame.
- FIG. 3 is a flowchart of a method for collecting audio data according to an embodiment of the present invention.
- the method for collecting audio data is given in this embodiment.
- the method for collecting audio data can be performed as follows:
- Step 301 Initialize a thread and each parameter state
- the threads that need to be initialized are: Initialize the audio collection thread and the graffiti thread, that is, the audio collection thread and the graffiti thread are all ready to start working; the initial parameters are required to: Set the pixel value of the pixel in the display box area to be full 0, that is, pure black.
- Step 302 The audio collection system is started
- the audio collection thread starts working, and can be set to collect every 20ms, and 160 audio frames are collected at a time, each audio frame is 16 bits, that is, 0-65535.
- Step 303 collecting audio data every 20 ms
- the audio collection thread continuously collects audio data in real time, and collects every 20ms, and collects 160 audio frames at a time, each audio frame is 16 bits, that is, 0-65535.
- Step 304 The data is stored in the Buff cache
- the user starts to talk, the audio collection system continuously collects audio data in real time, and the collected data is placed in a cache buff.
- Step 305 Whether to end
- step 303 it is judged whether there is audio available for the collection, and if so, the audio collection operation is ended, and if no, the process returns to step 303.
- FIG. 4 is a flow chart showing the operation of the voice graffiti system according to the embodiment of the present invention.
- the specific workflow of the voice graffiti system may include the following steps:
- Step 401 Initialize a thread and each parameter state;
- Step 402 The graffiti thread is started;
- the graffiti thread starts to obtain the audio frame data from the buff, such as 15634, 3789, 23456, etc., and divides the data according to the obtained data by 2, and then rounds it according to the value, and then finds the corresponding block area in the display screen according to the value. Pixels.
- the rounding by 2 is determined according to the correspondence between the audio frame and the pixel in the embodiment used in the present invention, but the correspondence is not unique, depending on the situation, that is, according to the audio frame and Depending on the correspondence of pixel settings.
- Step 403 Whether there is data in the buff
- Step 404 Take one of the data, and find the corresponding block area according to the screen scale operation (divide by 2);
- Step 405 Calling the system random function to obtain a random value
- the system's random function is called to calculate a value between 0 and 50000. If the system's random function generator is a value of 0-1, multiply by 50000.
- the value of 50000 here can be dynamically adjusted during system design, or it can be 500000 or other values, which can be adjusted according to the effect.
- Step 406 Read standard bit B
- the flag bit B After calculating the random value, read the flag bit B. If the flag bit B is 0, add the random value and the original value of the pixel. If the flag bit B is 1, the original pixel value is subtracted from the random value. , so you get a new pixel value.
- the flag bit B when the system is set, each pixel point is set with a flag bit, and the flag bit B is given an initial value, that is, 0 or 1, but after the pixel point is corresponding to the audio frame, the flag The assignment of bit B will change, as will be explained in the following examples.
- Step 407 Perform corresponding addition or subtraction according to the flag bit
- step 406 it has been explained that if the flag bit B is 0, the random value is added to the original value of the pixel. If the flag bit B is 1, the original pixel value is subtracted from the random value. However, as the pixel is increased by the corresponding number of times, the accumulated value or the reduced value may reach the threshold set by the system. For example, 0 or #FFFFFF (16777215), therefore, in this embodiment, if the new pixel value is set to be less than or equal to 0, the flag bit is set to 0, and the new pixel point is set to 0; If the value is greater than or equal to #FFFFFF ( 16777215 ), set flag bit B and set the new pixel value to #FFFFFF.
- Step 408 Write the newly obtained value (RGB value) to the corresponding pixel and display it on the screen;
- Step 409 Whether to end
- FIG. 5 is a schematic structural diagram of an apparatus for implementing voice graffiti according to an embodiment of the present invention.
- the voice graffiti implementation device is applied to a terminal with a display screen, including: a first acquisition module 50 configured to acquire a piece of audio data; and a corresponding module 52 configured to be based on a preset audio frame and Corresponding relationship of the pixels of the display screen corresponds to each audio frame of the audio data as a pixel point on the display screen; the processing module 54 is configured to perform color processing on the pixel point; and a display module 56, It is arranged to display the processed pixel on the display screen, so that the audio data is converted into a pair of graffiti works.
- the processing module 54 includes: a second acquiring module (not shown) configured to acquire a current RGB value of the pixel; a calling module (not shown), configured to call a random function calculation of the system a random value within a preset range; a calculation module (not shown) configured to calculate the current RGB value and the random value according to the assignment of the preset flag bit to obtain a new RGB value of the pixel .
- the calculating module includes: a first determining module (not shown), configured to determine whether the preset flag bit is assigned a value of 0 or 1, and obtain a first determining result; An adding module (not shown) is configured to add the current RGB value to the random value when the first determination result is 0; the subtraction module (not shown) is set to When the first determination result is 1, the current RGB value is subtracted from the random value.
- the implementation device of the voice graffiti further includes: a storage module (not shown), The audio data is placed in a storage unit; an output module (not shown) is arranged to output the audio data in units of the audio frames.
- the terminal provided by the embodiment of the present invention includes the foregoing apparatus for implementing voice graffiti.
- a storage medium is provided, the software being stored, including but not limited to: an optical disk, a floppy disk, a hard disk, a rewritable memory, and the like.
- modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
- the invention is not limited to any particular combination of hardware and software.
- a piece of speech of the user or a piece of audio of other language sources is collected, and a random graffiti work is presented.
- the user can also fix a certain sound frequency to speak, then the display will be displayed within a certain area.
- a picture work enhances the user experience of the terminal.
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Controls And Circuits For Display Device (AREA)
- User Interface Of Digital Computer (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
Description
语音涂鸦的实现方法、 装置以及终端 技术领域 Method, device and terminal for implementing voice graffiti
本发明属于终端产品领域, 更具体的, 涉及一种语音涂鸦的实现方法、 装置以及终端。 背景技术 The invention belongs to the field of terminal products, and more specifically relates to a method, a device and a terminal for realizing a voice graffiti. Background technique
随着通信技术的发展, 手机应用层出不穷, 目前有很多手机系统的涂鸦 应用程序, 但这些涂鸦功能的基本原理就是通过画笔在手机展幕上画画, 然 后形成涂鸦, 或者, 实时收集用户在触摸屏上的触摸动作所形成的轨迹并显 示在该触摸屏上形成涂鸦。 但是这种都是局限于文字或者书写的涂鸦方法, 用户体验不高。 发明内容 With the development of communication technology, mobile phone applications are emerging one after another. At present, there are many graffiti applications for mobile phone systems, but the basic principle of these graffiti functions is to draw on the mobile phone display through the brush, and then form graffiti, or collect users in real time on the touch screen. The trajectory formed by the touch action on the touch screen is displayed on the touch screen to form a graffiti. However, this is a graffiti method limited to text or writing, and the user experience is not high. Summary of the invention
本发明实施例公开一种语音涂鸦的实现方法、 装置以及终端, 用于解决 局限于文字或者书写的涂鸦方法而导致的用户体验不高的问题。 The embodiment of the invention discloses a method, a device and a terminal for implementing a voice graffiti, which are used for solving the problem that the user experience is not high due to the graffiti method limited to text or writing.
根据本发明的第一实施例, 提供一种语音涂鸦的实现方法, 包括: 语音涂鸦的实现方法, 应用于带有显示屏的终端, 包括获取一段音频数 据; 根据预先设定的音频帧与所述显示屏像素点的对应关系获取与所述音频 数据的每一音频帧对应的所述显示屏上的像素点; 对所述像素点进行颜色处 理; 以及将处理后的像素点在所述显示屏上显示, 使得所述音频数据转换为 一副涂鸦作品。 According to a first embodiment of the present invention, a method for implementing a voice graffiti is provided, including: a method for implementing a voice graffiti, applied to a terminal with a display screen, including acquiring a piece of audio data; according to a preset audio frame and a Corresponding relationship of display screen pixels acquires pixel points on the display screen corresponding to each audio frame of the audio data; color processing the pixel points; and placing the processed pixel points on the display Displayed on the screen, the audio data is converted into a pair of graffiti works.
较佳地, 所述音频帧与所述显示屏的显示区域像素点的对应关系至少为 如下一种: 所述显示区域的像素点个数大于等于音频帧最大量化值的时候, 一个音频帧对应 1个或多个显示区域像素点; 所述显示区域像素点个数小于 音频帧最大量化值的时候, 一个或多个音频帧对应一个显示区域像素点。 Preferably, the correspondence between the audio frame and the pixel of the display area of the display screen is at least one of the following: when the number of pixels of the display area is greater than or equal to the maximum quantization value of the audio frame, one audio frame corresponds to One or more display area pixel points; when the number of display area pixel points is smaller than the maximum quantization value of the audio frame, one or more audio frames correspond to one display area pixel point.
较佳地, 所述对所述像素点进行颜色处理包括: 获取所述像素点的当前 RGB值; 调用系统的随机函数计算出一预设范围内的随机值; 根据所述当前 RGB值与所述随机值计算出所述像素点的新 RGB值 , 并将所述新 RGB值赋 予所述像素点。 Preferably, the color processing of the pixel point comprises: acquiring a current RGB value of the pixel point; calling a random function of the system to calculate a random value within a preset range; The RGB value and the random value calculate a new RGB value for the pixel and assign the new RGB value to the pixel.
较佳地,所述根据所述当前 RGB值与所述随机值计算出所述像素点的新 RGB值包括: 判断所述像素点的标志位的赋值为 0还是 1 , 并得出第一判断 结果; 在所述第一判断结果为 0时, 将所述当前 RGB值与所述随机值相加; 在所述第一判断结果为 1时, 将所述当前 RGB值与所述随机值相减。 Preferably, the calculating the new RGB value of the pixel point according to the current RGB value and the random value comprises: determining whether the flag bit of the pixel point is 0 or 1 and obtaining the first judgment a result; when the first determination result is 0, adding the current RGB value to the random value; when the first determination result is 1, the current RGB value is compared with the random value Less.
较佳地, 所述标志位的赋值根据所述像素点的新 RGB值进行转换,在所 述像素点的新 RGB值由所述当前 RGB值与所述随机值相加达到第一阈值时, 将所述标志位的赋值置为 1 , 在所述像素点的新 RGB值由所述当前 RGB值 与所述随机值相减达到第二阈值时, 将所述标志位的赋值置为 0。 Preferably, the assignment of the flag bit is converted according to a new RGB value of the pixel point, and when a new RGB value of the pixel point is added by the current RGB value to the random value to reach a first threshold, The assignment of the flag bit is set to 1, and the value of the flag bit is set to 0 when the new RGB value of the pixel point is subtracted from the random value by the current value to a second threshold.
较佳地, 在所述获取一段音频数据之后, 所述语音涂鸦的实现方法还包 括: 将所述音频数据放入一存储单元; 并将所述音频数据以所述音频帧为单 位输出。 Preferably, after the acquiring a piece of audio data, the method for implementing the voice graffiti further comprises: placing the audio data into a storage unit; and outputting the audio data in units of the audio frame.
较佳地, 在将处理后的像素点在所述显示屏上进行显示之后, 所述语音 涂鸦的实现方法还包括: 判断所述存储单元是否为空, 并得出第三判断结果; 在所述第三结果为所述存储单元不为空时, 重复执行所述对所述像素点进行 颜色处理至所述将处理后的像素点在所述显示区域上显示, 使得所述音频数 据转换为一副涂鸦作品。 Preferably, after the processed pixel is displayed on the display screen, the method for implementing the voice graffiti further includes: determining whether the storage unit is empty, and obtaining a third determination result; The third result is that when the storage unit is not empty, the color processing of the pixel is repeatedly performed until the processed pixel is displayed on the display area, so that the audio data is converted into A pair of graffiti works.
根据本发明的另外一个实施例, 提供一种语音涂鸦的实现装置, 应用于带有显示屏的终端, 包括: 第一获取模块, 设置为获取一段音频 数据; 对应模块, 设置为根据预先设定的音频帧与所述显示屏像素点的对应 关系获取与所述音频数据的每一音频帧对应的所述显示屏上的像素点; 处理 模块, 设置为对所述像素点进行 色处理; 以及显示模块, 设置为将处理后 的像素点在所述显示屏上显示, 使得所述音频数据转换为一副涂鸦作品。 According to another embodiment of the present invention, a device for implementing voice graffiti is provided for a terminal with a display screen, including: a first acquiring module configured to acquire a piece of audio data; and a corresponding module configured to be preset according to a corresponding relationship between the audio frame and the display pixel pixel to acquire a pixel on the display screen corresponding to each audio frame of the audio data; a processing module configured to perform color processing on the pixel point; And a display module, configured to display the processed pixel on the display screen, so that the audio data is converted into a pair of graffiti works.
较佳地, 所述处理模块包括: 第二获取模块, 设置为获取所述像素点的 当前 RGB值; 调用模块,设置为调用系统的随机函数计算出一预设范围内的 随机值; 计算模块,设置为根据所述当前 RGB值与所述随机值计算出所述像 素点的新 RGB值, 并将所述新 RGB值赋予所述像素点。 较佳地, 所述计算模块包括: 第一判断模块, 设置为判断所述像素点的 标志位的赋值为 0还是 1 , 并得出第一判断结果; 相加模块, 设置为在所述 第一判断结杲为 0时, 将所述当前 RGB值与所述随机值相加; 相减模块, 设 置为在所述第一判断结果为 1时, 将所述当前 RGB值与所述随机值相减。 Preferably, the processing module includes: a second acquiring module, configured to acquire a current RGB value of the pixel point; and a calling module configured to calculate a random value in a preset range by calling a random function of the system; And setting to calculate a new RGB value of the pixel according to the current RGB value and the random value, and assign the new RGB value to the pixel. Preferably, the calculation module includes: a first determining module, configured to determine whether the flag of the pixel is assigned a value of 0 or 1, and obtain a first determination result; and the adding module is set to be in the When the judgment result is 0, the current RGB value is added to the random value; and the subtraction module is configured to set the current RGB value and the random value when the first determination result is 1. Subtraction.
较佳地, 所述语音涂鸦的实现装置还包括: 存储模块, 设置为将所述音 频数据放入一存储单元; 输出模块, 设置为将所述音频数据以所述音频帧为 单位输出。 Preferably, the voice graffiti implementation device further includes: a storage module configured to put the audio data into a storage unit; and an output module configured to output the audio data in units of the audio frame.
根据本发明的又一个实施例, 提供一种终端, 该终端包括上述的语音涂 鸦的实现装置。 According to still another embodiment of the present invention, a terminal is provided, the terminal comprising the above-described implementation device for voice coating.
通过本发明实施例的上述技术方案, 采集用户的一段讲话或者其他语言 来源的一段音频, 就会呈现出一幅^随意的涂鸦作品, 当然用户也可以固定 某个声音频率说话, 那么就会显示一段区域内的一幅图画作品, 提高了终端 的用户体验。 附图概述 Through the above technical solution of the embodiment of the present invention, a piece of speech of a user or a piece of audio of other language sources is collected, and a random graffiti work is presented. Of course, the user can also fix a certain sound frequency to speak, then the display will be displayed. A picture work in a section enhances the user experience of the terminal. BRIEF abstract
附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发明的 示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在 附图中: The drawings are intended to provide a further understanding of the present invention, and are intended to be a part of the present invention, and the description of the present invention and the description thereof are not intended to limit the invention. In the drawing:
图 1表示本发明实施例所述的语音涂鸦的实现方法流程图; 1 is a flow chart showing a method for implementing voice graffiti according to an embodiment of the present invention;
图 2表示本发明实施例所述的显示屏上像素点分布示意图; 2 is a schematic diagram showing the distribution of pixel points on a display screen according to an embodiment of the present invention;
图 3表示本发明实施例所述的音频数据采集方法流程图; 3 is a flowchart of an audio data collection method according to an embodiment of the present invention;
图 4表示本发明实施例所述的语音涂鴉系统工作流程图; 以及 图 5表示本发明实施例所述的语音涂鸦的实现装置的结构示意图。 本发明的较佳实施方式 Figure 4 is a flow chart showing the operation of the voice graffiti system according to the embodiment of the present invention; and Figure 5 is a block diagram showing the structure of the voice graffiti implementation device according to the embodiment of the present invention. Preferred embodiment of the invention
以下结合附图对本发明的实施例进行详细说明。 需要说明的是, 在不冲 突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。 图 1表示本发明实施例所述的语音涂鸦的实现方法流程图。 Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. FIG. 1 is a flow chart showing a method for implementing voice graffiti according to an embodiment of the present invention.
参见图 1所示, 语音涂鸦的实现方法, 应用于带有显示屏的终端, 可包 括如下步骤: Referring to Figure 1, the implementation of the voice graffiti is applied to a terminal with a display, which may include the following steps:
a: 获取一段音频数据; a: Get a piece of audio data;
b:根据预先设定的音频帧与所述显示屏像素点的对应关系将所述音频数 据的每一音频帧对应为所述显示屏上的像素点; b: corresponding each audio frame of the audio data to a pixel point on the display screen according to a correspondence between a preset audio frame and the display pixel pixel;
c: 对所述像素点进行颜色处理; 以及 c: color processing the pixel; and
d: 将处理后的像素点在所述显示屏上显示, 使得所述音频数据转换为一 副涂鸦作品。 d: displaying the processed pixel on the display screen to convert the audio data into a graffiti artwork.
在本实施例的上述技术方案中, 步骤 a中的获取一段音频数据, 可以是 用户的一段讲话, 带有显示屏的终端的音频采集系统可以实时的不停的采集 该段讲话, 当然, 音频数据的来源可以有很多, 并不限于用户的一段讲话, 例如可以是一段音乐, 一位歌手演唱的一首歌曲等等, 这些, 通过本发明的 实施例均可以形成涂鸦作品; 在步骤 b中, 是将上述釆集的音频数据转换为 显示屏上的像素点, 具体的方法是通过预先设置音频数据的音频帧与显示屏 像素点的关系来将音频数据转换为显示屏上的像素点, 然后通过步骤 c对该 像素点进行颜色处理, 并在步骤 d中将经过颜色处理的像素点在显示屏上对 应的位置上进行显示, 数个像素点连起来形成了一副涂鸦作品。 通过上述过 程, 即可以通过语音的方法在手机或其他终端的屏幕上形成涂鸦画面, 提高 了使用者的用户体验。 In the above technical solution of the embodiment, the obtaining of a piece of audio data in step a may be a speech of the user, and the audio collection system of the terminal with the display screen may continuously collect the speech in the real-time, of course, the audio The source of the data may be many, not limited to a speech by the user, for example, may be a piece of music, a song sung by a singer, etc., and the graffiti works can be formed by the embodiment of the present invention; in step b , is to convert the audio data of the above set into pixel points on the display screen, the specific method is to convert the audio data into pixel points on the display screen by presetting the relationship between the audio frame of the audio data and the pixel of the display screen. Then, the pixel is color-processed by step c, and the color-processed pixel is displayed on the corresponding position on the display screen in step d, and the plurality of pixels are connected to form a pair of graffiti works. Through the above process, a graffiti image can be formed on the screen of a mobile phone or other terminal by means of voice, thereby improving the user experience of the user.
优选地, 所述音频帧与所述显示屏像素点的对应关系为: 所述显示屏像 素点个数为所述音频帧最大量化值的整数倍或 1/2倍。 Preferably, the correspondence between the audio frame and the pixel of the display screen is: the number of pixels of the display screen is an integer multiple or 1/2 times the maximum quantization value of the audio frame.
图 2表示本发明实施例所述的显示屏上像素点分布示意图。 FIG. 2 is a schematic diagram showing the distribution of pixel points on a display screen according to an embodiment of the invention.
参见图 2所示, 以一手机终端为例, 由于各种移动终端的屏幕像素是不 一样的, 而通常标准的配置的屏幕为 480*800分辨率, 也就是说, 这种屏幕 总共有 38400个像素点。 本实施例就以一个 480*800的表格来模拟屏幕的像 素点, 每一个格子就代表屏幕上的一个像素点, 然后从上往下, 从左往右排 序, 最左上方是 0 , 最右下方是 38400。 另外, 如图 2所示, 音频数据的采集通过该手机终端的麦克采集, 目前 音频数据是 20ms采集一次, 每次采集会包含 160个音频帧, 每个音频帧是 2 个字节, 即 16位。 按照换算, 每个音频帧可以用 0-65535的整数来表示。 Referring to FIG. 2, taking a mobile phone terminal as an example, since the screen pixels of various mobile terminals are different, the screen of the standard configuration is usually 480*800 resolution, that is, the total number of such screens is 38,400. Pixels. In this embodiment, a pixel of 480*800 is used to simulate the pixel points of the screen, each grid represents a pixel on the screen, and then sorted from top to bottom, left to right, and the top left is 0, the rightmost Below is 38400. In addition, as shown in FIG. 2, the collection of audio data is collected by the microphone of the mobile terminal. Currently, the audio data is collected once in 20 ms, and each acquisition includes 160 audio frames, and each audio frame is 2 bytes, that is, 16 Bit. According to the conversion, each audio frame can be represented by an integer of 0-65535.
由于音频帧是 0-65535 , 所以为了方便, 不需要使用全部的屏幕像素点, 设计的时候取其中的 32768个像素点就可以了。 这样正好是音频帧最大数值 的一半。 这样, 就可以预先设置音频帧与显示屏像素点的对应关系为音频帧 数值每两位就对应一个屏幕像素点。 Since the audio frame is 0-65535, for the sake of convenience, it is not necessary to use all the screen pixels, and 32768 pixels of the design can be taken. This is exactly half of the maximum value of the audio frame. In this way, the correspondence between the audio frame and the pixel of the display screen can be set in advance to correspond to one screen pixel point every two digits of the audio frame value.
通过本实施例的上述技术方案, 对音频帧每次采集的时候, 由于人讲话 的声音不同, 每次采集到的音频帧的数值大小也会不同。 这样根据音频帧的 不同就可以对应到不同的屏幕像素点上面, 最终形成不同的涂鸦画面。 With the above technical solution of the embodiment, each time an audio frame is collected, the value of the audio frame collected each time is different because the voice of the person speaks differently. In this way, according to the difference of the audio frames, it can correspond to different screen pixels, and finally form different graffiti pictures.
优选地, 所述对所述像素点进行颜色处理包括: 获取所述像素点的当前 RGB值; 调用系统的随机函数计算出一预设范围内的随机值; 根据所述当前 RGB值与所述随机值计算出所述像素点的新 RGB值。 Preferably, the color processing of the pixel point comprises: acquiring a current RGB value of the pixel point; calling a random function of the system to calculate a random value within a preset range; according to the current RGB value and the The random value calculates the new RGB value of the pixel.
通过上个实施例可以完成音频帧到像素点的转换, 而在本实施例中, 要 对各个像素点进行颜色处理, 首先, 需要了解一个色阶的概念, 色阶是表示 液晶显示屏亮度强弱的指数标准, 也就是通常所说的色彩指数。 各种屏幕的 色阶不同, 目前市面上常用的 1600W色阶。 一般手机显示屏是以 RGB来表 示颜色的, 从纯黑色 #000000, 到純白 #FFFFFF, 对应整数是 0-16777215。 The audio frame to pixel point conversion can be completed by the previous embodiment. In this embodiment, color processing is performed on each pixel. First, it is necessary to understand the concept of a color gradation, and the color gradation indicates that the liquid crystal display has strong brightness. The weak index standard, also known as the color index. The gradation of the various screens is different, and the 1600W color gradation currently used in the market. The general mobile phone display shows colors in RGB, from pure black #000000, to pure white #FFFFFF, and the corresponding integer is 0-16777215.
在本实施中仍以具有 32768个像素点的显示屏为例, 每个像素点的 RGB 颜色初始状态都置为 #000000, 即一开始都是纯黑色的。 In this embodiment, the display screen with 32,768 pixels is still taken as an example. The initial state of the RGB color of each pixel is set to #000000, that is, it is pure black at the beginning.
像素点的初始 RGB值是 0, 每一个像素点在被一音频帧对应后, 均调用 随机函数算出一个 0-50000以内的数值, 用这个数值与 RGB初始值相加形成 一新的 RGB值作为该像素点处理后的颜色值。此处的 50000这个值可以在系 统设计的时候动态调整, 也可以是 500000或者其他值, 可根据效果来调节。 如果某个像素点被对应了多次, 因此累加后的值就可能超过iFFFFFF , 那么 就开始做减法用^?????值减去该像素点当前的 RGB值,作为该像素点的新 的 RGB值, 如此不停的循环, 直到讲话完毕。 The initial RGB value of the pixel is 0. After each pixel is corresponding to an audio frame, a random function is called to calculate a value within 0-50000, and this value is added to the initial value of RGB to form a new RGB value. The color value of the pixel after processing. The value of 50000 here can be dynamically adjusted during system design, or it can be 500000 or other values, which can be adjusted according to the effect. If a pixel is corresponding to multiple times, the accumulated value may exceed iFFFFFF, then start subtracting the value of ^????? minus the current RGB value of the pixel as the new point of the pixel. The RGB value, so looping, until the speech is finished.
这样一段话讲下来, 就会呈现出一幅很随意的涂鸦作品, 当然用户也可 以固定某个声音频率说话, 那么就会显示一段区域内的一幅图画作品。 If you say this in a paragraph, you will present a very random graffiti. Of course, users can also To speak at a certain sound frequency, a picture artwork in a section is displayed.
优选地,根据所述当前 RGB值与所述随机值计算出所述像素点的新 RGB 值包括: 判断所述像素点的标志位的赋值为 0还是 1 , 并得出第一判断结果; 在所述第一判断结果为 0时, 将所述当前 RGB值与所述随机值相加; 在所述 第一判断结果为 1时, 将所述当前 RGB值与所述随机值相减。 Preferably, calculating the new RGB value of the pixel point according to the current RGB value and the random value comprises: determining whether the flag bit of the pixel point is 0 or 1 and obtaining a first determination result; When the first determination result is 0, the current RGB value is added to the random value; when the first determination result is 1, the current RGB value is subtracted from the random value.
在将一段音频数据的一个一个的音频帧向显示屏上的像素点进行转换的 过程中, 一个像素点可以被一个以上的音频帧所对应, 此时用该像素点的当 前 RGB值与随机值是进行相加还是相减要根据该像素点所设定的标志位来 进行判断, 即在计算出随机值后, 就读取该标志位, 该标志位可以设置为 B, 如果 B为 0就把随机值和像素点的当前 RGB值相加,如果 B为 1, 就用像素 点的当前 RGB值减去随机值, 如此来得到一个像素点新的 RGB值。 In the process of converting one audio frame of one piece of audio data to a pixel on the display screen, one pixel point may be corresponding to more than one audio frame, and the current RGB value and random value of the pixel point are used at this time. Whether to add or subtract is determined according to the flag set by the pixel, that is, after the random value is calculated, the flag is read, and the flag can be set to B, if B is 0 Add the random value to the current RGB value of the pixel. If B is 1, subtract the random value from the current RGB value of the pixel, thus obtaining a new RGB value for one pixel.
在该像素点在下一次又被一个音频帧对应时, 此时用该像素点的当前 RGB值与随机值是进行相加还是相减要仍要根据该像素点所设定的标志位来 进行判断, 只是, 该标志位会根据上一次的像素点新的 RGB值进行变换。 When the pixel point is corresponding to an audio frame next time, whether the current RGB value of the pixel point and the random value are added or subtracted are still determined according to the flag bit set by the pixel point. However, the flag will be converted based on the new RGB value of the last pixel.
优选地, 所述标志位的赋值根据所述像素点的新 RGB值进行转换,在所 述像素点的新 RGB值由所述当前 RGB值与所述随机值相加达到第一阈值时, 将所述标志位的赋值置为 1, 在所述像素点的新 RGB值由所述当前 RGB值 与所述随机值相减达到第二阈值时, 将所述标志位的赋值置为 0。 Preferably, the assignment of the flag bit is converted according to a new RGB value of the pixel point, and when a new RGB value of the pixel point is added by the current RGB value to the random value to reach a first threshold, The assignment of the flag bit is set to 1, and the value of the flag bit is set to 0 when the new RGB value of the pixel point is subtracted from the random value by the current RGB value to reach a second threshold.
在本实施例的上述技术方案中,可设置第一阈值为 #FFFFFF( 16777215 ) , 第二阈值为 0, 也就是说, 这个新像素点值如果小于等于 0, 那么 ^巴标志位 B 置 0, 并把这个新像素点置设置为 0; 这个像素点值如果大于等于 #FFFFFF ( 16777215 ) , 就把标志位 B置 1, 并把这个新像素点值设置为 #FFFFFF。 In the above technical solution of the embodiment, the first threshold may be set to #FFFFFF (16777215), and the second threshold is 0. That is, if the new pixel value is less than or equal to 0, then the ^B flag bit B is set to 0. And set this new pixel to 0; if the pixel value is greater than or equal to #FFFFFF ( 16777215 ), set flag B to 1, and set the new pixel value to #FFFFFF.
本实施例的上述技术方案,设置了像素点的颜色处理方法, 通过随机函 数计算出随机值,并与该像素点的当前 RGB值相加或相减得出该像素点的新 RGB值, 并将该新 RGB值赋给该像素点并在显示屏上显示出来, 但是这种 颜色处理方法并不唯一, 而且调用系统的随机函数计算出的随机值区间也是 可以根据实际效杲进行调节的, 因此任何允许的能对像素点颜色进行处理的 方法均涵盖在本发明保护范围之内。 优选地, 在所述获取一段音频数据之后, 所述语音涂鸦的实现方法还包 括: 将所述音频数据放入一存储单元; 并将所述音频数据以所述音频帧为单 位输出。 In the above technical solution of the embodiment, a color processing method of a pixel is set, a random value is calculated by a random function, and a new RGB value of the pixel is obtained by adding or subtracting a current RGB value of the pixel, and The new RGB value is assigned to the pixel and displayed on the display screen, but the color processing method is not unique, and the random value interval calculated by calling the random function of the system can also be adjusted according to the actual effect. Therefore, any method that allows processing of pixel color is encompassed within the scope of the present invention. Preferably, after the acquiring a piece of audio data, the method for implementing the voice graffiti further comprises: putting the audio data into a storage unit; and outputting the audio data in units of the audio frame.
图 3表示本发明实施例所述的音频数据釆集方法流程图。 FIG. 3 is a flowchart of a method for collecting audio data according to an embodiment of the present invention.
本实施例给出的是音频数据采集的方法, 具体可参见图 3所示, 音频数 据采集的方法可按如下步骤进行: The method for collecting audio data is given in this embodiment. For details, as shown in FIG. 3, the method for collecting audio data can be performed as follows:
步骤 301: 初始化线程和各参数状态; Step 301: Initialize a thread and each parameter state;
在本步骤中, 需要初始化的线程有: 初始化音频采集线程以及涂鸦线程, 即音频采集线程以及涂鸦线程均准备开始工作; 需要初始的参数有: 设置显 示屏方块区域中的像素点 RGB值为全 0, 即纯黑色。 In this step, the threads that need to be initialized are: Initialize the audio collection thread and the graffiti thread, that is, the audio collection thread and the graffiti thread are all ready to start working; the initial parameters are required to: Set the pixel value of the pixel in the display box area to be full 0, that is, pure black.
步骤 302: 音频采集系统启动; Step 302: The audio collection system is started;
在本步骤中,音频采集线程启动工作,并且可以设置为每 20ms采集一次, 一次采集 160个音频帧, 每个音频帧是 16位, 即 0-65535。 In this step, the audio collection thread starts working, and can be set to collect every 20ms, and 160 audio frames are collected at a time, each audio frame is 16 bits, that is, 0-65535.
步骤 303: 每 20ms采集音频数据; Step 303: collecting audio data every 20 ms;
根据上述设置, 音频采集线程实时的不停采集音频数据, 并且每 20ms 采集一次, 一次采集 160个音频帧, 每个音频帧是 16位, 即 0-65535。 According to the above settings, the audio collection thread continuously collects audio data in real time, and collects every 20ms, and collects 160 audio frames at a time, each audio frame is 16 bits, that is, 0-65535.
步骤 304: 釆集数据存放在 Buff緩存中; Step 304: The data is stored in the Buff cache;
在本步骤中, 用户开始讲话, 音频采集系统实时的不停采集音频数据, 采集到的数据放在一个缓存 buff中。 In this step, the user starts to talk, the audio collection system continuously collects audio data in real time, and the collected data is placed in a cache buff.
步骤 305: 是否结束; Step 305: Whether to end;
本步骤的是指判断是否有音频可供釆集, 若是, 结束音频釆集工作, 若 否, 返回执行步骤 303。 In this step, it is judged whether there is audio available for the collection, and if so, the audio collection operation is ended, and if no, the process returns to step 303.
通过本实施例的上述技术方案在系统的緩存 buff中, 就釆集了一定音频 数据, 同时另外一个涂鸦线程开始工作, 具体可参见图 4。 Through the above technical solution of the embodiment, in the cache buff of the system, a certain audio data is collected, and another graffiti thread starts working. For details, refer to FIG. 4.
图 4表示本发明实施例所述的语音涂鸦系统工作流程图。 FIG. 4 is a flow chart showing the operation of the voice graffiti system according to the embodiment of the present invention.
参见图 4所示, 语音涂鸦系统具体工作流程可包括如下步骤: Referring to FIG. 4, the specific workflow of the voice graffiti system may include the following steps:
步骤 401: 初始化线程和各参数状态; 步骤 402: 涂鸦线程启动; Step 401: Initialize a thread and each parameter state; Step 402: The graffiti thread is started;
在本步骤中 ,涂鸦线程开始从 buff中获取音频帧数据,比如 15634, 3789, 23456等, 每次根据获取的数据除以 2后取整, 然后根据这个数值去找到显 示屏对应的方块区域中的像素点。 此处, 除以 2后取整是根据本发明所釆用 的实施例中的音频帧与像素点对应关系决定的, 但是, 该对应关系不是唯一 的, 根据情况而定, 即根据音频帧与像素点设置的对应关系而定。 In this step, the graffiti thread starts to obtain the audio frame data from the buff, such as 15634, 3789, 23456, etc., and divides the data according to the obtained data by 2, and then rounds it according to the value, and then finds the corresponding block area in the display screen according to the value. Pixels. Here, the rounding by 2 is determined according to the correspondence between the audio frame and the pixel in the embodiment used in the present invention, but the correspondence is not unique, depending on the situation, that is, according to the audio frame and Depending on the correspondence of pixel settings.
步骤 403: buff中是否有数据; Step 403: Whether there is data in the buff;
判断 buff 中是否有数据, 若是, 执行步骤 404 , 若否返回继续执行步骤 Determine if there is data in the buff, if yes, go to step 404, if no, go back to the step
403 ; 403 ;
步骤 404: 取其中一个数据, 根据屏幕比例操作后(除以 2 )找到对应的 方块区域; Step 404: Take one of the data, and find the corresponding block area according to the screen scale operation (divide by 2);
在本步骤中, 找到某个像素点后, 先获取该像素点的当前 RGB数值。 步骤 405: 调用系统随机函数得到一个随机值; In this step, after finding a pixel, first obtain the current RGB value of the pixel. Step 405: Calling the system random function to obtain a random value;
在本步骤中, 调用系统的随机函数计算出一个 0-50000之间的值出来, 如果系统的随机函数生成器是 0-1的值, 那么再乘以 50000。 此处的 50000这 个值可以在系统设计的时候动态调整, 也可以是 500000或者其他值, 可根据 效果来调节。 In this step, the system's random function is called to calculate a value between 0 and 50000. If the system's random function generator is a value of 0-1, multiply by 50000. The value of 50000 here can be dynamically adjusted during system design, or it can be 500000 or other values, which can be adjusted according to the effect.
步骤 406: 读取标准位 B; Step 406: Read standard bit B;
计算出随机值后, 再读取标志位 B, 如果标志位 B为 0就把随机值和像 素点原来的值相加, 如果标志位 B为 1 , 就把原来的像素点值减去随机值, 这样就得到一个新的像素点值。 至于标志位 B, 在系统设置时, 每一个像素 点都设置了一个标志位, 并且给该标志位 B赋了初始值, 即 0或 1, 但是在 该像素点被音频帧对应后, 该标志位 B的赋值会发生变化, 这一点在随后的 实施例中会具体说明。 After calculating the random value, read the flag bit B. If the flag bit B is 0, add the random value and the original value of the pixel. If the flag bit B is 1, the original pixel value is subtracted from the random value. , so you get a new pixel value. As for the flag bit B, when the system is set, each pixel point is set with a flag bit, and the flag bit B is given an initial value, that is, 0 or 1, but after the pixel point is corresponding to the audio frame, the flag The assignment of bit B will change, as will be explained in the following examples.
步骤 407: 根据标志位做相应的加法或减法; Step 407: Perform corresponding addition or subtraction according to the flag bit;
在步骤 406中, 已经说明如果标志位 B为 0就把随机值和像素点原来的 值相加, 如果标志位 B为 1 , 就把原来的像素点值减去随机值。 但是随着该 像素点被对应的次数增加, 其累加值或累减值可能会达到系统设置的阈值, 如 0或#FFFFFF ( 16777215 ) , 因此, 在本实施例中, 设置这个新像素点值如 果小于等于 0, 那么把标志位 Β置 0, 并把这个新像素点置设置为 0; 这个像 素点值如杲大于等于 #FFFFFF ( 16777215 ), 就把标志位 B置 1, 并把这个新 像素点值设置为 #FFFFFF。 In step 406, it has been explained that if the flag bit B is 0, the random value is added to the original value of the pixel. If the flag bit B is 1, the original pixel value is subtracted from the random value. However, as the pixel is increased by the corresponding number of times, the accumulated value or the reduced value may reach the threshold set by the system. For example, 0 or #FFFFFF (16777215), therefore, in this embodiment, if the new pixel value is set to be less than or equal to 0, the flag bit is set to 0, and the new pixel point is set to 0; If the value is greater than or equal to #FFFFFF ( 16777215 ), set flag bit B and set the new pixel value to #FFFFFF.
步骤 408: 把新得到的值(RGB值)写入对应的像素点, 并显示在屏幕 上; Step 408: Write the newly obtained value (RGB value) to the corresponding pixel and display it on the screen;
步骤 409: 是否结束; Step 409: Whether to end;
重复上述步骤,直到 buff緩存中为空,那么停止等待 buff中的数据到来, 并且按下停止结束按钮, 所有线程停止操作, 画面上显示出来的色彩图案就 是用户的语音涂鸦作品, 这个作品用户可以进行保存, 或者共享操作。 Repeat the above steps until the buff buffer is empty, then stop waiting for the data in the buff to arrive, and press the stop end button, all threads stop operating, the color pattern displayed on the screen is the user's voice graffiti works, the user of this work can Save, or share the operation.
图 5表示本发明实施例所述的语音涂鸦的实现装置的结构示意图。 FIG. 5 is a schematic structural diagram of an apparatus for implementing voice graffiti according to an embodiment of the present invention.
参见图 5所示, 语音涂鸦的实现装置, 应用于带有显示屏的终端, 包括: 第一获取模块 50, 设置为获取一段音频数据; 对应模块 52, 设置为根据预先 设定的音频帧与所述显示屏像素点的对应关系将所述音频数据的每一音频帧 对应为所述显示屏上的像素点; 处理模块 54, 设置为对所述像素点进行颜色 处理; 以及显示模块 56, 设置为将处理后的像素点在所述显示屏上显示, 使 得所述音频数据转换为一副涂鸦作品。 As shown in FIG. 5, the voice graffiti implementation device is applied to a terminal with a display screen, including: a first acquisition module 50 configured to acquire a piece of audio data; and a corresponding module 52 configured to be based on a preset audio frame and Corresponding relationship of the pixels of the display screen corresponds to each audio frame of the audio data as a pixel point on the display screen; the processing module 54 is configured to perform color processing on the pixel point; and a display module 56, It is arranged to display the processed pixel on the display screen, so that the audio data is converted into a pair of graffiti works.
优选地, 所述处理模块 54包括: 第二获取模块(图中未示), 设置为获 取所述像素点的当前 RGB值; 调用模块(图中未示), 设置为调用系统的随 机函数计算出一预设范围内的随机值; 计算模块(图中未示) , 设置为根据 预设标志位的赋值将所述当前 RGB值与所述随机值进行计算获取所述像素 点的新 RGB值。 Preferably, the processing module 54 includes: a second acquiring module (not shown) configured to acquire a current RGB value of the pixel; a calling module (not shown), configured to call a random function calculation of the system a random value within a preset range; a calculation module (not shown) configured to calculate the current RGB value and the random value according to the assignment of the preset flag bit to obtain a new RGB value of the pixel .
优选地, 所述计算模块(图中未示) 包括: 第一判断模块(图中未示) , 设置为判断所述预设标志位的赋值为 0还是 1, 并得出第一判断结果; 相加 模块(图中未示), 设置为在所述第一判断结果为 0时, 将所述当前 RGB值 与所述随机值相加; 相减模块(图中未示) , 设置为在所述第一判断结果为 1时, 将所述当前 RGB值与所述随机值相减。 Preferably, the calculating module (not shown) includes: a first determining module (not shown), configured to determine whether the preset flag bit is assigned a value of 0 or 1, and obtain a first determining result; An adding module (not shown) is configured to add the current RGB value to the random value when the first determination result is 0; the subtraction module (not shown) is set to When the first determination result is 1, the current RGB value is subtracted from the random value.
优选地, 所述语音涂鸦的实现装置还包括: 存储模块(图中未示) , 设 置为将所述音频数据放入一存储单元; 输出模块(图中未示) , 设置为将所 述音频数据以所述音频帧为单位输出。 Preferably, the implementation device of the voice graffiti further includes: a storage module (not shown), The audio data is placed in a storage unit; an output module (not shown) is arranged to output the audio data in units of the audio frames.
本发明实施例提供的终端包括上述的语音涂鸦的实现装置。 The terminal provided by the embodiment of the present invention includes the foregoing apparatus for implementing voice graffiti.
通过本发明的以上实施例, 可以看出, 一段讲话、 一段录音以及任何一 段音频, 通过本发明提供的技术方案, 就会呈现出一幅很随意的涂鸦作品, 而且没有任何的复杂操作, 没有任何硬件上的投入, 只是通过音频采集系统 就会在显示屏上显示一段区域内的一幅图画作品,提高了使用者的用户体验。 Through the above embodiments of the present invention, it can be seen that a speech, a recording, and any piece of audio, through the technical solution provided by the present invention, presents a very random graffiti work without any complicated operation, Any hardware investment, just through the audio acquisition system, will display a picture in a section on the display, which improves the user experience.
在另外一个实施例中, 还提供了一种软件, 该软件用于执行上述实施例 及优选实施方式中描述的技术方案。 In another embodiment, software is also provided for performing the technical solutions described in the above embodiments and preferred embodiments.
在另外一个实施例中, 还提供了一种存储介质, 该存储介质中存储有上 述软件, 该存储介质包括但不限于: 光盘、 软盘、 硬盘、 可擦写存储器等。 In still another embodiment, a storage medium is provided, the software being stored, including but not limited to: an optical disk, a floppy disk, a hard disk, a rewritable memory, and the like.
显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程 序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 并 且在某些情况下, 可以以不同于此处的顺序执行所示出或描述的步骤, 或者 将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作 成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软件 结合。 Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any particular combination of hardware and software.
以上所述是本发明的优选实施方式, 应当指出, 对于本技术领域的普通 技术人员来说, 在不脱离本发明所述原理的前提下, 还可以作出若干改进和 润饰, 这些改进和润饰也应视为本发明的保护范围。 工业实用性 The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention. Industrial applicability
本发明实施例采集用户的一段讲话或者其他语言来源的一段音频, 就会 呈现出一幅^ ί艮随意的涂鸦作品, 当然用户也可以固定某个声音频率说话, 那 么就会显示一段区域内的一幅图画作品, 提高了终端的用户体验。 In the embodiment of the present invention, a piece of speech of the user or a piece of audio of other language sources is collected, and a random graffiti work is presented. Of course, the user can also fix a certain sound frequency to speak, then the display will be displayed within a certain area. A picture work enhances the user experience of the terminal.
Claims
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210321276.0 | 2012-09-03 | ||
| CN201210321276.0A CN103685683B (en) | 2012-09-03 | 2012-09-03 | Implementation method, device and terminal that voice are scribbled |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2013178129A1 true WO2013178129A1 (en) | 2013-12-05 |
Family
ID=49672459
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2013/078773 Ceased WO2013178129A1 (en) | 2012-09-03 | 2013-07-04 | Voice scrawling implementation method, device and terminal |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN103685683B (en) |
| WO (1) | WO2013178129A1 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104464741B (en) * | 2014-12-29 | 2018-04-06 | 中山大学花都产业科技研究院 | A kind of audio signal turns the method and system of visual color information |
| CN107901694A (en) * | 2017-11-14 | 2018-04-13 | 上海电机学院 | A kind of interactive drawing method and device based on sound frequency value |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1524350A (en) * | 2001-03-29 | 2004-08-25 | 哈茉尼彩色音技术开发公司 | Telephone and method for converting sound into image and displaying on screen |
| CN1885976A (en) * | 2005-06-24 | 2006-12-27 | 英华达(上海)电子有限公司 | Method for making sound graphic display and playing on mobile phone display screen |
| US20070203979A1 (en) * | 2006-02-14 | 2007-08-30 | Walker Mark R | Home communications server |
| CN101916569A (en) * | 2010-08-03 | 2010-12-15 | 北京中星微电子有限公司 | Method and device for displaying sound |
| CN201957113U (en) * | 2010-12-15 | 2011-08-31 | 上海华勤通讯技术有限公司 | Mobile phone with multimedia diary function |
| US20110258556A1 (en) * | 2010-04-16 | 2011-10-20 | Microsoft Corporation | Social home page |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080183474A1 (en) * | 2007-01-30 | 2008-07-31 | Damion Alexander Bethune | Process for creating and administrating tests made from zero or more picture files, sound bites on handheld device |
-
2012
- 2012-09-03 CN CN201210321276.0A patent/CN103685683B/en not_active Expired - Fee Related
-
2013
- 2013-07-04 WO PCT/CN2013/078773 patent/WO2013178129A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1524350A (en) * | 2001-03-29 | 2004-08-25 | 哈茉尼彩色音技术开发公司 | Telephone and method for converting sound into image and displaying on screen |
| CN1885976A (en) * | 2005-06-24 | 2006-12-27 | 英华达(上海)电子有限公司 | Method for making sound graphic display and playing on mobile phone display screen |
| US20070203979A1 (en) * | 2006-02-14 | 2007-08-30 | Walker Mark R | Home communications server |
| US20110258556A1 (en) * | 2010-04-16 | 2011-10-20 | Microsoft Corporation | Social home page |
| CN101916569A (en) * | 2010-08-03 | 2010-12-15 | 北京中星微电子有限公司 | Method and device for displaying sound |
| CN201957113U (en) * | 2010-12-15 | 2011-08-31 | 上海华勤通讯技术有限公司 | Mobile phone with multimedia diary function |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103685683A (en) | 2014-03-26 |
| CN103685683B (en) | 2015-08-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| RU2667027C2 (en) | Method and device for video categorization | |
| CN109089043A (en) | Shoot image pre-processing method, device, storage medium and mobile terminal | |
| CN106155640B (en) | A kind of volume display methods and device | |
| CN104754536A (en) | Method and system for realizing communication between different languages | |
| WO2016188494A1 (en) | Expression curve generation method based on voice input, and apparatus using same | |
| CN103024266A (en) | Shooting optimization method, system and device of mobile terminal | |
| WO2020077914A1 (en) | Image processing method and apparatus, and hardware apparatus | |
| CN110992963A (en) | Network communication method, device, computer equipment and storage medium | |
| CN108550107A (en) | A kind of image processing method, picture processing unit and mobile terminal | |
| CN106303293B (en) | Video processing method and device and mobile terminal | |
| CN114969657B (en) | A method and system for customizing the calculation and processing of detection data | |
| CN109600544A (en) | A kind of local dynamic station image generating method and device | |
| CN108903521A (en) | A kind of man-machine interaction method applied to intelligent picture frame, intelligent picture frame | |
| CN109104633A (en) | Video screenshot method and device, storage medium and mobile terminal | |
| CN104113682B (en) | A kind of image acquiring method and electronic equipment | |
| WO2013178129A1 (en) | Voice scrawling implementation method, device and terminal | |
| EP4564831A1 (en) | Multimedia data transmission method and apparatus, and electronic device and storage medium | |
| CN109164999A (en) | A kind of method, apparatus that table is adaptively shown, equipment and readable storage medium storing program for executing | |
| US20240290305A1 (en) | Music generation method and apparatus, device, storage medium, and program | |
| CN110225285B (en) | Audio and video communication method and device, computer device and readable storage medium | |
| CN106488106B (en) | A kind of image processing method and device | |
| CN108012190A (en) | A kind of video merging method and device | |
| CN110069641B (en) | Image processing method and device and electronic equipment | |
| WO2025067090A1 (en) | Image processing method and apparatus, and electronic device and medium | |
| JP2012212997A (en) | Display device and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13797733 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 13797733 Country of ref document: EP Kind code of ref document: A1 |