Patent Description:
Various electronic devices may be connected to each other based on various communication specifications. For example, an electronic device may be connected to an external electronic device based communication specifications such as Bluetooth or Bluetooth low energy (BLE). When connected, the electronic device (e.g., car kit or artificial intelligence (AI) speaker) may make a voice call using the connected external electronic device (e.g. mobile phone). For the purpose of making the voice call, the electronic device may transmit voice of the user received through a microphone to the mobile phone and may receive voice data received from the cellular network through the mobile phone. As such, the electronic device may transmit and receive encoded audio data with the external electronic device (e.g., mobile phone) based on a particular communication specification.

When the electronic device transmits audio data to the external electronic device, the electronic device may encode audio data based on the particular specification used to connect to the external electronic device. For example, when the electronic device is connected to the external electronic device based on the Bluetooth or BLE specification, the electronic device may encode audio data using one of various speech codecs defined in the Bluetooth or BLE specification. And more specifically, the electronic device may encode the audio data using modified subband coding (mSBC) codec widely used in the Bluetooth or BLE specification.

<CIT> and <CIT> discuss relevant background art.

Electronic devices may transmit audio data using packets defined based on the Bluetooth or BLE specification. For example, when using the mSBC codec, one such electronic device may generate a bit-stream by encoding the audio data at a compression rate of <NUM> kbps. The electronic device may divide the bit-stream into sizes corresponding to specified time intervals and may transmit data packets of the divided bit-stream at specified times.

For example, the electronic device may divide the bit-stream of audio data into frames of <NUM> and may transmit data packets including the divided frames after elapse of a specified time period (e.g., <NUM>). These time periods may be referred to as cycles. The receiving electronic device may receive the data packet at the beginning or the end of a particular cycle and may decode and play the frame included in the received packet in real time. In this case, because the length of the frame of audio data received at a cycle is equal to the length of the time period, the receiving electronic device may not be able to separately buffer the audio data. Accordingly, when a data packet is lost at a cycle, the receiving electronic device may be disconnected. For example, loss of data packets may occur due to interference in the communication channels used by the electronic devices.

In accordance with an aspect of the disclosure, an electronic device may include a speaker, a communication circuit, a processor operatively connected to the communication circuit, and a memory operatively connected to the processor. The memory may store one or more instructions that, when executed, cause the processor to receive first data including a first audio frame corresponding to a first interval and a second audio frame corresponding to a second interval subsequent to the first interval, using the communication circuit, to store the second audio frame in the memory in response to reception of the first data, to output a first audio signal generated based on the first audio frame, through the speaker, to store the third audio frame in the memory and output a second audio signal generated based on the second audio frame of the second data through the speaker when second data including the second audio frame and a third audio frame corresponding to a third interval subsequent to the second interval is received using the communication circuit, and to output the second audio signal generated based on the second audio frame of the first data stored in the memory, through the speaker when at least part of the second data is not received using the communication circuit.

In accordance with another aspect of the disclosure, an electronic device may include a communication circuit, a processor operatively connected to the communication circuit, and a memory operatively connected to the processor. The memory may store instructions that, when executed, cause the processor to obtain audio data, to encode the audio data using a specified codec to generate a plurality of frames each having a size corresponding to a single connection interval; and to transmit a first data packet including a first frame and a second frame subsequent to the first frame among the plurality of frames to an external electronic device in a first connection interval.

In accordance with another aspect of the disclosure, an electronic device may include a communication circuit, a processor operatively connected to the communication circuit, and a memory operatively connected to the processor. The memory may store one or more instructions that, when executed, cause the processor to obtain audio data, to encode the audio data using a specified codec to generate a plurality of frames each having a size corresponding to a single connection interval, and to transmit a first data packet including two or more frames among the plurality of frames to an external electronic device at a first specified time interval, using the communication circuit. A second data packet transmitted in a second specified time interval may include at least one frame that is same as one of the two or more frames included in the first data packet transmitted in the first specified time interval preceding the second specified time interval.

In accordance with another aspect of the disclosure, a data transmitting method of an electronic device may include obtaining audio data, encoding the audio data using a specified codec to generate a plurality of frames each having a size corresponding to a single connection interval, transmitting a first data packet including a first frame and a second frame subsequent to the first frame among the plurality of frames to an external electronic device in a first connection interval, and transmitting a second data packet including the second frame and a third frame subsequent to the second frame to the external electronic device in a second connection interval subsequent to the first connection interval.

According to certain embodiments disclosed in the specification, an electronic device may increase the signal to noise ratio (SNR) at the receiver by increasing a traffic margin.

In certain embodiments in the specification, a method of transmitting and receiving audio data that is more robust to interference may be provided.

According to certain embodiments disclosed in the specification, even though some packets are lost within the connection interval, the electronic device may prevent unwanted muting of the audio signal by performing retransmission within the same connection interval using the traffic margin.

According to certain embodiments disclosed in this specification, the electronic device may buffer the audio data, using at least part of a plurality of bit-stream frames in the received data packet.

In addition, a variety of features and advantages directly or indirectly understood through the disclosure may be provided.

Hereinafter, various embodiments of the disclosure may be described with reference to accompanying drawings. The embodiments and terms used with regard to the embodiments are not intended to limit the technology described herein to specific embodiments, and should be understood to include various modifications, equivalents, and/or alternatives of the embodiments.

According to an embodiment, the auxiliary processor <NUM> (e.g., an 'image signal processor or a communication processor) may be implemented as part of another component (e.g., the camera module <NUM> or the communication module <NUM>) functionally related to the auxiliary processor <NUM>.

According to various embodiments, the electronic device <NUM> may include at least part of the components of the electronic device <NUM> illustrated in <FIG>. According to an embodiment, the electronic device <NUM> may include the communication module <NUM>, the processor <NUM> operatively connected to the communication module <NUM>, and a memory <NUM> operatively connected to the processor <NUM>. For example, the memory <NUM> may store instructions that, when executed, cause the processor <NUM> to perform the operations of the electronic device <NUM> to be described later. According to an embodiment, the electronic device <NUM> may further include a configuration not illustrated in <FIG>. For example, the electronic device <NUM> may further include housing that accommodates at least part of the configurations of the electronic device <NUM>.

<FIG> is a view illustrating a communication environment <NUM> of the electronic device <NUM>, according to an embodiment.

According to an embodiment, the electronic device <NUM> may communicate with another electronic device (e.g., the electronic device <NUM> or the server <NUM> of <FIG>, not shown) through the second network <NUM>. According to an embodiment, the electronic device <NUM> may perform communication through the second network <NUM>, using at least one communication circuit (e.g., the communication module <NUM> of <FIG>). For example, the electronic device <NUM> may perform long range wireless communication through the second network <NUM> (e.g., long range wireless communication networks such as cellular network, Internet, or computer network (e.g., LAN or WAN)).

According to an embodiment, the electronic device <NUM> may communicate with the external electronic device <NUM> (e.g., the electronic device <NUM> of <FIG>), using short range wireless communication (e.g., the first network <NUM>). According to an embodiment, the electronic device <NUM> may communicate with the external electronic device <NUM>, using at least one communication circuit (e.g., the communication module <NUM> of <FIG>). For example, the electronic device <NUM> may communicate with the external electronic device <NUM> based on a specified communication specification (e.g., Wi-Fi, Bluetooth, BLE, Zigbee, or neighbor awareness network (NAN)), using at least one communication circuit.

According to an embodiment, the electronic device <NUM> may communicate with the external electronic device <NUM> based on the Bluetooth communication specification. For example, the electronic device <NUM> may be an electronic device paired with the external electronic device <NUM>. For example, the electronic device <NUM> may be connected to the paired external electronic device <NUM> and may transmit or receive data through the connection with the external electronic device <NUM>.

According to an embodiment, the electronic device <NUM> may transmit data obtained from the second network <NUM> to the external electronic device <NUM>. The electronic device <NUM> may receive data packets of a particular communication protocol associated with the second network <NUM> and may transmit at least part of the received data packets to the external electronic device <NUM>. For example, the electronic device <NUM> may generate data packets of a communication protocol associated with the first network <NUM>, using at least part of the received data packets, and may transmit the generated data packets to the external electronic device <NUM>.

According to an embodiment, the electronic device <NUM> may transmit the data obtained by the electronic device <NUM> itself to the external electronic device <NUM>. For example, the electronic device <NUM> may obtain audio data using an equipped microphone (e.g., the input device <NUM> of <FIG>) and may generate data packets of a communication protocol associated with the first network <NUM> based on the obtained data. The electronic device <NUM> may then transmit the generated data packets to the external electronic device <NUM>.

According to an embodiment, the electronic device <NUM> may receive data from the external electronic device <NUM>. For example, the electronic device <NUM> may receive data from the external electronic device <NUM> via the first network <NUM>. The electronic device <NUM> may transmit the received data through the second network <NUM>. The electronic device <NUM> may obtain audio data from the received data and may output an audio signal corresponding to the audio data, using a speaker (e.g., the sound output device <NUM> of <FIG>).

According to an embodiment, the external electronic device <NUM> may be an electronic device that is similar to the electronic device <NUM>. For example, the external electronic device <NUM> may be an AI speaker having a configuration similar to that of the electronic device <NUM>. In <FIG>, the electronic device <NUM> is illustrated as a mobile phone; and the external electronic device <NUM> is illustrated as an AI speaker; however, embodiments of the disclosure are not limited thereto.

Hereinafter, it may be assumed that the electronic device <NUM> transmits and receives data packets including audio data to and from the external electronic device <NUM>, using Bluetooth communication. Bluetooth communication is exemplary, and the electronic device <NUM> may communicate with the external electronic device <NUM> using various short range communications. For convenience of description, in the described embodiments the electronic device <NUM> transmits data packets to the external electronic device <NUM>, but embodiments of the instant disclosure are not so limited. In an alternative embodiment, the external electronic device <NUM> may transmit data packets to the electronic device <NUM>.

<FIG> is a block diagram illustrating the structure of a basic rate packet <NUM>, according to an embodiment.

When the electronic device <NUM> transmits a data packet to the external electronic device <NUM> based on the Bluetooth communication specification, the electronic device <NUM> may use a basic rate packet. <FIG> illustrates the general format of such a packet <NUM>.

According to an embodiment, the basic rate packet <NUM> may include an access code <NUM>, a header <NUM>, and a payload <NUM>. The structure of the basic rate packet <NUM> illustrated in <FIG> is exemplary, and the packet structure of the instant disclosure is not so limited. For example, in other alternative embodiments, the basic rate packet <NUM> may include only the access code <NUM> or only the access code <NUM> and the header <NUM>.

According to an embodiment, the access code <NUM> may have length of <NUM> or <NUM> bits. The access code <NUM> may be used for synchronization, direct current (DC) offset compensation, and/or packet identification. The access code <NUM> may be used to identify all packets exchanged on a physical channel. For example, the packets transmitted on the same physical channel may include the same access code <NUM>.

According to an embodiment, the header <NUM> may have length of <NUM> bits and may be the header of the packet. Referring to <FIG>, the header <NUM> may include a logical transport address (LT_ADDR) <NUM>, a TYPE <NUM>, a FLOW <NUM>, an automatic repeat request number (ARQN) <NUM>, a sequence number (SEQN) <NUM>, and a header error check (HEC) <NUM>.

For example, the LT_ADDR <NUM> may include the logical transport address of the corresponding packet (e.g., the basic rate packet <NUM> of <FIG>). The LT_ADDR <NUM> may include the address of the logical transport channel of a destination or a source, depending on the slot in which the packet is transmitted.

For example, the TYPE <NUM> may indicate the type of the corresponding packet. For example, the TYPE <NUM> may indicate whether the packet is transmitted through synchronous connection oriented link (SCO) logical transport, enhanced SCO (eSCO) logical transport, asynchronous connection-less (ACL) logical transport, or connectionless slave broadcast (CSB) logical transport. In one embodiment, the TYPE <NUM> may indicate whether the packet is an SCO packet, an eSCO packet, or an ACL packet.

For example, the FLOW <NUM> may be used for flow control of packets transmitted on the ACL logical transport. The FLOW <NUM> may not be used on the eSCO logical transport.

For example, the ARQN <NUM> may indicate whether the payload data is successfully transmitted to the transmitting device. For example, when the previously received payload data is successfully received, the electronic device <NUM> may include information indicating acknowledgment in the ARQN <NUM>. In another example, when the previously received payload data is not successfully received, the electronic device <NUM> may include information indicating negative acknowledgment negative-ACK in the ARQN <NUM>.

For example, the SEQN <NUM> may include information indicating the order of data packet streams.

For example, the HEC <NUM> may be used to identify one or more errors of the header <NUM>. Thus, the receiving device may identify the integrity of the header <NUM>, using the HEC <NUM> of the header <NUM> of the received packet.

Returning to <FIG>, the payload <NUM> may include information to be transmitted by the transmitting device. For example, the payload <NUM> may include audio data, such as audio data encoded into packets. The payload <NUM> may have length of <NUM> to <NUM> bits.

<FIG> is a block diagram illustrating the structure of an enhanced data rate packet <NUM>, according to an embodiment.

When the electronic device <NUM> transmits data packets to the external electronic device <NUM> based on the Bluetooth communication specification, the electronic device <NUM> may use the enhanced data rate packet format <NUM> as shown in <FIG>.

According to an embodiment, the enhanced data rate packet <NUM> may include an access code <NUM>, a header <NUM>, a guard <NUM>, a sync <NUM>, an enhanced data rate payload <NUM>, and a trailer <NUM>. For example, the access code <NUM> and the header <NUM> may be modulated based on Gaussian frequency-shift keying (GFSK). The sync <NUM>, the enhanced data rate payload <NUM>, and the trailer <NUM> may be modulated based on differential phase-shift keying (DPSK). For example, the guard <NUM> may be positioned between the end of the GFSK symbol of the header <NUM> and the start of the synchronization sequence (e.g., the sync <NUM>) of the header <NUM>. The sync <NUM> may include synchronization sequence information for synchronization. The enhanced data rate payload <NUM> may include information to be transmitted by the transmitting device (e.g. the electronic device <NUM>). For example, the trailer <NUM> may include a plurality of <NUM> bits.

Returning to <FIG>, according to an embodiment, the electronic device <NUM> may obtain audio data and may generate a bit-stream by encoding the audio data using a specified codec. For example, the electronic device <NUM> may encode the audio data using an audio codec associated with the first network <NUM>. According to an embodiment, the electronic device <NUM> may encode the audio data using an audio codec defined in the Bluetooth communication specification. For example, the electronic device <NUM> may generate a bit-stream by encoding the audio data using the modified sub band codec (mSBC).

According to an embodiment, the electronic device <NUM> may divide the bit-stream into a plurality of frames with sizes corresponding to a specified time interval. For example, the electronic device <NUM> may generate a frame such that the length of audio data corresponding to the frame is the length of a connection interval of the Bluetooth communication specification. For example, the length of the connection interval may be about <NUM> milliseconds (ms).

According to an embodiment, the electronic device <NUM> may transmit data packets including the plurality of frames to the external electronic device <NUM>. For example, the electronic device <NUM> may transmit a data packet in each connection interval. The electronic device <NUM> may modulate at least one frame depending on the type of the data packet and may transmit the data packet, in which the modulated frame is included as the payload, to the external electronic device <NUM>. For example, the type of data packet may be indicated by its header (e.g., the header <NUM> of <FIG>). Specifically, the type of data packet may be indicated by the TYPE <NUM> of the header.

Hereinafter, the data transmitting methods of the electronic device <NUM> will be described with reference to <FIG>. In <FIG>, for convenience of description, the delay between the transmitter (e.g., the electronic device <NUM>) and the receiver (e.g., the external electronic device <NUM>) may be negligible and thus ignored. However, in real life scenarios, there may be a delay between the transmitter and the receiver.

<FIG> is a diagram illustrating audio data transmission <NUM>, according to an embodiment.

Referring to <FIG>, the electronic device <NUM> may transmit a data packet to the external electronic device <NUM> in each of a first connection interval T1, a second connection interval T2, a third connection interval T3, a fourth connection interval T4, a fifth connection interval T5, and a sixth connection interval T6. For example, a first data packet <NUM> may include a first frame; a second data packet <NUM> may include a second frame; a third data packet <NUM> may include a third frame; a fourth data packet <NUM> may include a fourth frame; a fifth data packet <NUM> may include a fifth frame; and a sixth data packet <NUM> may include a sixth frame.

According to an embodiment, the electronic device <NUM> may generate a plurality of frames by encoding audio data into the frames using the specified codec. For example, the electronic device <NUM> may generate a frame having a specified size from audio data using a codec with a compression rate of <NUM> kbps. In another example, the electronic device <NUM> may generate frames with sizes corresponding to a connection interval.

According to an embodiment, the size of the frame may be determined based on the length of the connection interval. For example, the length of the connection interval may be <NUM>. Then when the electronic device <NUM> uses the <NUM> kbps compression rate codec, the size of each frame may be <NUM> bytes.

According to an embodiment, the electronic device <NUM> may generate a data packet for each of the generated frame. For example, the electronic device <NUM> may generate a data packet that includes a generated frame in its payload. The electronic device <NUM> may generate a data packet by modulating data including a frame depending on a specified packet type.

According to an embodiment, the electronic device <NUM> may transmit and receive audio data using a profile, which is set to transmit and receive the audio data, or logical transport. For example, the electronic device <NUM> may transmit and receive the audio data, using SCO logical transport or eSCO logical transport. The SCO logical transport may be point-to-point transport between a master and a specific slave, which are symmetric. The eSCO logical transport may be point-to-point transport between a master and a specific slave.

According to an embodiment, the electronic device <NUM> may transmit and receive audio data, using data packets of the type used in the eSCO logical transport. For example, the electronic device <NUM> may transmit and receive audio data using extended voice <NUM> (EV3) packets capable of transmitting <NUM> bytes in a connection interval.

In the embodiment of <FIG>, the electronic device <NUM> may encode audio data, using an audio codec having compression rate of <NUM> kbps. In this case, the generated frames are smaller than those of conventional mSBC codec having compression rate of <NUM> kbps. When the electronic device <NUM> transmits one frame in each connection interval, the traffic margin may be increased as compared to using the mSBC codec. Due to the increase in the traffic margin, the electronic device <NUM> may perform communication that is more robust to external interference.

In the embodiment of <FIG>, for example, the electronic device <NUM> may transmit and receive audio data using EV3 packets capable of transmitting <NUM> bytes per connection interval instead of <NUM>-EV3 packets capable of transmitting <NUM> bytes per connection interval. The electronic device <NUM> may increase the signal-to-noise ratio (SNR) at the receiver of the data packet by transmitting and receiving audio data using the EV3 packets instead of the <NUM>-EV3 packets.

According to an embodiment, due to the increased traffic margin, the electronic device <NUM> may be able to retransmit lost packets. For example, a data packet transmitted by the electronic device <NUM> may be lost due to various reasons such as external interference. In this example, when it is determined that a data packet transmitted within a particular connection interval is lost, the electronic device <NUM> may retransmit the data packet in the traffic margin within the same connection interval. For example, the fifth data packet <NUM> transmitted in the fifth connection interval may be lost. In this case, the electronic device <NUM> is able to retransmit the fifth data packet <NUM> within the fifth connection interval, because there is sufficient traffic margin in the fifth connection interval. For example, the electronic device <NUM> may retransmit the fifth data packet <NUM> to the external electronic device <NUM> using the traffic margin within the connection interval generated due to the use of the codec with increased compression rate (e.g., <NUM> kbps). According to an embodiment, when a negative acknowledgment NACK for a data packet transmitted within the connection interval is received from the external electronic device <NUM> or an acknowledgment ACK is not received, the electronic device <NUM> may perform retransmission of the data packet within the same connection interval.

According to an embodiment, the external electronic device <NUM> may output an audio signal corresponding to the received data packets. For example, the external electronic device <NUM> may receive the first data packet <NUM> including the first frame in the first connection interval T1 and may output the signal corresponding to the first frame during the time corresponding to the first connection interval T1, using audio data corresponding to the first frame included in the first data packet. For example, the external electronic device <NUM> may demodulate the first data packet <NUM> to obtain the encoded audio data (e.g., the first frame) and may decode the encoded audio data to output the audio signal. In the embodiment of <FIG>, the external electronic device <NUM> may output the audio signal using real-time decoding.

<FIG> is a diagram illustrating transmission <NUM> of data packets including a plurality of frames, according to an embodiment.

Referring to <FIG>, the electronic device <NUM> may transmit a first data packet <NUM> including a first frame and a second frame in the first connection interval T1; the electronic device <NUM> may transmit a second data packet <NUM> including the second frame and a third frame in the second connection interval T2; the electronic device <NUM> may transmit a third data packet <NUM> including the third frame and a fourth frame in the third connection interval T3; the electronic device <NUM> may transmit a fourth data packet <NUM> including the fourth frame and a fifth frame in the fourth connection interval T4; the electronic device <NUM> may transmit a fifth data packet <NUM> including the fifth frame and a sixth frame in the fifth connection interval T5; and the electronic device <NUM> may transmit a sixth data packet <NUM> including the sixth frame and a seventh frame in the sixth connection interval T6.

According to an embodiment, the electronic device <NUM> may generate a plurality of frames by encoding audio data into frames using a specified codec. For example, the electronic device <NUM> may generate frames having specified sizes from the audio data using the codec having compression rate of <NUM> kbps. For example, the electronic device <NUM> may generate frames having sizes corresponding to the connection interval. The length of the connection interval may be <NUM>.

According to an embodiment, the electronic device <NUM> may generate data packets each including the generated plurality of frames. For example, the electronic device <NUM> may generate a data packet that includes a plurality of frames in tis payload. For example, the electronic device <NUM> may transmit a plurality of frames as one packet, using the <NUM>-EV3 type packet used in eSCO logical transport. As such, the <NUM>-EV3 packet may include two frames and would enable transmission of <NUM> bytes per connection interval.

According to an embodiment, the data packet transmitted by the electronic device <NUM> may include audio data corresponding to a plurality of connection intervals. As shown in <FIG>, the electronic device <NUM> may transmit a data packet including the previously transmitted frame and a frame subsequent to the previously transmitted frame. For example, in the second connection interval T2, the electronic device <NUM> may transmit, to the external electronic device <NUM>, the second data packet <NUM> which includes the second frame transmitted in the first connection interval T1 and the third frame subsequent to the second frame.

For example, when the electronic device <NUM> uses an audio codec having compression rate of <NUM> kbps, the electronic device may transmit a <NUM>-EV3 type data packet that includes two frames each having a size of <NUM> bytes in a single connection interval. Also, one of the frames may be a frame transmitted in the previous connection interval. In this case, the electronic device <NUM> may effectively transmit most of the frames twice to the external electronic device <NUM>.

According to an embodiment, the external electronic device <NUM> may obtain two frames consecutively in time from a single data packet. For example, the external electronic device <NUM> may obtain two frames consecutively in time by demodulating the received data packet. The external electronic device <NUM> may output an audio signal by decoding the preceding frame among the two frames and may buffer the subsequent frame. For example, the external electronic device <NUM> may output the audio signal in a time interval corresponding to the connection interval using the preceding frame among the plurality of frames of the data packet received in the connection interval. The external electronic device <NUM> may further buffer the subsequent frame among the plurality of frames of the data packet received in the connection interval.

Referring to <FIG>, for example, the external electronic device <NUM> may receive a fourth data packet <NUM> including the fourth frame and the fifth frame in the fourth connection interval T4. According to an embodiment, the external electronic device <NUM> may decode the fourth frame of the received fourth data packet <NUM> to output an audio signal corresponding to the fourth frame in a time interval corresponding to the fourth connection interval T4. The external electronic device <NUM> may buffer the fifth frame of the received fourth data packet <NUM>. In the fifth connection interval T5, the fifth data packet <NUM> transmitted by the electronic device <NUM> may not be successfully received by the external electronic device <NUM> due to interference. For example, the fifth data packet <NUM> may be lost. In this case, the external electronic device <NUM> may output audio data in a time interval corresponding to the fifth connection interval T5, using the fifth frame of the buffered fourth data packet <NUM>. Accordingly, despite the loss of the fifth data packet <NUM>, the external electronic device <NUM> may seamlessly output the audio signal using the buffered fifth frame.

In the example shown in <FIG>, the data packet includes two frames, but embodiments of the disclosure are not so limited. In alternative embodiments, the data packet may include any number of frames. For example, the receiver (e.g., the external electronic device <NUM>) may decode and output one frame among the received plurality of frames and may buffer the remaining frames to prepare for packet loss. As such, the external electronic device <NUM> may improve unwanted muting of the audio by buffering a part of the plurality of frames.

According to an embodiment, the external electronic device <NUM> may transmit a request for retransmission to the electronic device <NUM> when there are no buffered frames. For example, when the request for the retransmission is received, the electronic device <NUM> may retransmit the previously transmitted data packet. Accordingly, the electronic device <NUM> may reduce consumption of wireless resources due to the retransmission, because retransmission is only required when the buffered frames are exhausted.

<FIG> is a diagram illustrating retransmission <NUM> of a data packet based on a traffic margin, according to an embodiment.

Referring to <FIG>, according to an embodiment, the electronic device <NUM> may transmit a data packet including a plurality of frames in a time period corresponding to the plurality of frames. For example, the electronic device <NUM> may transmit a first data packet <NUM> including a first frame and a second frame in a first connection interval T1; the electronic device <NUM> may transmit a second data packet <NUM> including a third frame and a fourth frame in a third connection interval T3; the electronic device <NUM> may transmit a third data packet <NUM> including a fifth frame and a sixth frame in a fifth connection interval T5. Thus, in this example, when the data packet includes two frames, the electronic device <NUM> may be configured to transmit the data packet for each even-numbered or odd-numbered connection interval.

According to an embodiment, the electronic device <NUM> may generate a plurality of frames by encoding audio data into frames using the specified codec. For example, the electronic device <NUM> may generate frames having specified sizes from the audio data using the codec having compression rate of <NUM> kbps. For example, the electronic device <NUM> may generate frames of sizes corresponding to a connection interval. For example, the length of the connection interval may be <NUM>. For example, the electronic device <NUM> may transmit a plurality of frames as one packet, where the packet is the <NUM>-EV3 type used in eSCO logical transport.

According to an embodiment, the data packet transmitted by the electronic device <NUM> may include audio data corresponding to a plurality of connection intervals. For example, the electronic device <NUM> may transmit a data packet including a plurality of frames that are sequential in time. For example, in the first connection interval T1, the electronic device <NUM> may transmit, to the external electronic device <NUM>, the first data packet <NUM> including the first frame and the second frame subsequent to the first frame.

According to an embodiment, the state of the electronic device <NUM> may be transitioned to a first state (e.g., a wake-up state or an active state) in the connection interval in which the data packet is transmitted, and then the electronic device <NUM> may transmit a data packet; after the transmission of the data packet, the state of the electronic device <NUM> may be transitioned to a second state (e.g., a sleep state or an inactive state) until the transmission of the next data packet. For example, the state of the electronic device <NUM> may be transitioned to the first state in the first connection interval T1, and then the electronic device <NUM> may transmits the first data packet <NUM>; and then, the state of the electronic device <NUM> may be transitioned to the second state in the second connection interval T2. Because the electronic device <NUM> does not need to be maintained in the first state in each connection interval, the power consumption of the electronic device <NUM> may be reduced. Furthermore, because the electronic device <NUM> transmits data in a time divisional manner, that is, not transmitting data in each connection interval, the electronic device <NUM> may reduce the interference with other wireless communication (e.g., Wi-Fi communication) using time division communication.

According to an embodiment, the external electronic device <NUM> may obtain two frames from a single data packet. For example, the external electronic device <NUM> may obtain two frames, one sequential in time from the other, by demodulating the received data packet.

According to an embodiment, the external electronic device <NUM> may decode the preceding frame among the two frames received in the preceding connection interval to output an audio signal in the current connection interval and may output an audio signal, using the subsequent frame in the subsequent connection interval after buffering the subsequent frame of the two frames. For example, in the first connection interval T1, the external electronic device <NUM> may receive the first data packet <NUM> including the first frame and the second frame. The external electronic device <NUM> may decode the first frame in the second connection interval T2 subsequent to the first connection interval T1 to output an audio signal and may buffer the second frame. The external electronic device <NUM> may output the audio signal, using the second frame buffered in the third connection interval T3 subsequent to the second connection interval T2.

According to an embodiment, the electronic device <NUM> may perform retransmission of a lost packet in the connection interval where data packets are not otherwise transmitted. For example, the third data packet <NUM> transmitted in the fifth connection interval T5 may be lost due to interference. In this case, the electronic device <NUM> may retransmit the third data packet <NUM> in the subsequent sixth connection interval T6. For example, when the acknowledgment for the third data packet <NUM> is not received from the external electronic device <NUM> or when the negative acknowledgment for the third data packet <NUM> is received, the electronic device <NUM> may retransmit the third data packet <NUM>.

According to an embodiment, the external electronic device <NUM> may decode a preceding first frame among a plurality of frames of the data packet received in the first connection interval T1 to output the decoded first frame in the second connection interval T2; next, the external electronic device <NUM> may buffer the second frame and then may output the buffered second frame in the third connection interval T3. In this case, the external electronic device <NUM> not only buffers one subsequent frame but also delays the output by one frame. Further, for example even though the third data packet <NUM> transmitted in the fifth connection interval T5 is lost, the external electronic device <NUM> may perform seamless audio output by obtaining a retransmitted third data packet <NUM> in the sixth connection interval T6 during the delay. This way, unwanted muting of the audio is reduced because timely retransmission is enabled.

<FIG> is a flowchart <NUM> of a method of transmitting audio data, according to an embodiment.

According to an embodiment, the electronic device <NUM> may be an electronic device that communicates with an external electronic device (e.g., the external electronic device <NUM> of <FIG>). For example, the electronic device <NUM> may be an electronic device configured to communicate with the external electronic device <NUM> at specified time intervals (e.g., connection intervals). According to an embodiment, the electronic device <NUM> may be configured to transmit data packets including audio data to the external electronic device <NUM> at specified time intervals.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may obtain audio data. For example, the electronic device <NUM> may obtain the audio data by receiving a wireless signal including the audio data using a communication circuit (e.g., the communication module <NUM> of <FIG>). For another example, the electronic device <NUM> may obtain the audio data using an input device (e.g., the input device of <FIG>) such as a microphone. For another example, the electronic device <NUM> may obtain the audio data stored in a memory (e.g., the memory <NUM> of <FIG>). The above methods of obtaining audio data are only examples, and the electronic device <NUM> may obtain the audio data via various methods. For example, the audio data may be a digital signal of an audio signal. The digital signal may be obtained by converting an analog audio signal to the digital signal.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may generate a bit-stream by encoding the audio data, using a specified codec. According to an embodiment, the electronic device <NUM> may generate the bit-stream by encoding the audio data using the audio codec of a particular communication specification (e.g., Bluetooth communication specification) for communication with the external electronic device <NUM>. For example, the electronic device <NUM> may generate the bit-stream, using the codec having compression rate of <NUM> kbps.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may generate a plurality of frames with sizes corresponding to a specified time interval (e.g., connection interval) from the bit-stream. For example, the electronic device <NUM> may generate a plurality of frames by dividing the bit-stream by the specified size. For example, the size of each of the plurality of frames may correspond to the period of the time slots in which the electronic device <NUM> transmits data to the external electronic device <NUM>. For example, the specified time interval may be <NUM>. The electronic device <NUM> may be configured to transmit a data packet at a specified time interval.

According to an embodiment, operation <NUM> and operation <NUM> may be combined. For example, the electronic device <NUM> may generate a frame by encoding audio data into a bit-stream having the specified size, using a specified codec. The electronic device <NUM> may generate a plurality of frames by sequentially encoding the audio data.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may transmit a data packet including one frame among a plurality of frames within a specified time interval. For example, the electronic device <NUM> may transmit a data packet to the external electronic device <NUM> at a specified time interval (e.g., connection interval). For example, as described above with reference to <FIG>, the electronic device <NUM> may transmit a data packet including one frame to the external electronic device <NUM> at a specified time interval.

According to an embodiment, the electronic device <NUM> may generate a data packet using data packet format according to a communication specification (e.g., Bluetooth) for communication with the external electronic device <NUM>. For example, the electronic device <NUM> may generate an EV3 type data packet including one frame. The type of the data packet may be indicated by a field of the header of the packet (e.g., the TYPE <NUM> of <FIG>). The electronic device <NUM> may transmit the data packet using a communication circuit to the external electronic device <NUM>. The electronic device <NUM> may sequentially transmit data packets to the external electronic device <NUM> at specified time intervals.

According to an embodiment, the size of the data packet may be such that the size of the traffic margin is at least about <NUM>% or more of a specified time interval. For example, the electronic device <NUM> may select an audio codec having a compression rate that allows the generated data packet to have a traffic margin of at least about <NUM>% or more with respect to the specified time interval.

According to an embodiment, when the electronic device <NUM> fails to transmit a data packet to the external electronic device <NUM>, the electronic device <NUM> may retransmit the data packet. For example, when an acknowledgment is not received from the external electronic device <NUM> or when a negative acknowledgment is received from the external electronic device <NUM>, the electronic device <NUM> may retransmit the data packet. According to an embodiment, the electronic device <NUM> may retransmit the data packet within the same time interval as the time interval in which the data packet is transmitted (i.e. within the traffic margin).

<FIG> is a flowchart <NUM> of a method of transmitting a data packet including a plurality of frames, according to an embodiment.

According to an embodiment, the electronic device <NUM> may be an electronic device that communicates with an external electronic device (e.g., the external electronic device <NUM> of <FIG>). For example, the electronic device <NUM> may be an electronic device configured to communicate with the external electronic device <NUM> at specified time intervals (e.g., connection intervals). According to an embodiment, the electronic device <NUM> may be configured to transmit a data packet including audio data to the external electronic device <NUM> at a specified time interval.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may obtain audio data. Operation <NUM> may be similar to operation <NUM> of <FIG>.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may generate a bit-stream by encoding the audio data, using a specified codec. Operation <NUM> may be similar to operation <NUM> of <FIG>.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may generate a plurality of frames with sizes corresponding to the specified time interval (e.g., connection interval) from the bit-stream. Operation <NUM> may be similar to operation <NUM> of <FIG>.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may transmit a data packet including first frame and a second frame among the plurality of frames within the specified time interval. For example, the electronic device <NUM> may transmit a data packet to the external electronic device <NUM> at the beginning or end of the specified time interval (e.g., connection interval).

According to an embodiment, the electronic device <NUM> may generate the data packet using a data packet format according to a communication specification (e.g., Bluetooth) for communication with the external electronic device <NUM>. For example, the electronic device <NUM> may generate a <NUM>-EV3 type data packet including a plurality of frames. The type of the data packet may be indicated by a field of the header of the packet (e.g., the TYPE <NUM> of <FIG>). For example, a plurality of frames may correspond to pieces of continuous audio data. The electronic device <NUM> may transmit data packets generated using a communication circuit, to the external electronic device <NUM>.

According to an embodiment, in the next specified time interval, the electronic device <NUM> may transmit a data packet including the second frame and a third frame subsequent to the second frame, to the external electronic device <NUM>. For example, the electronic device <NUM> may transmit a data packet including at least one frame among a plurality of frames included in the preceding data packet in the next specified time interval. For example, the plurality of frames included in the data packet may sequentially correspond to pieces of continuous voice data. For example, as described above with reference to <FIG>, the electronic device <NUM> may transmit a data packet including a plurality of frames in each connection interval.

According to an embodiment, the electronic device <NUM> may transmit a data packet including a plurality of frames to the external electronic device <NUM>, in each even-numbered or odd-numbered time intervals. For example, as described above with reference to <FIG>, the electronic device <NUM> may transmit a data packet including a plurality of frames in each odd-numbered connection interval. The data packet may include a plurality of frames subsequent to the frames of the data packet transmitted in the previous time interval. For example, when the electronic device <NUM> transmits a data packet including the first frame and the second frame in the previous even-numbered time interval, the electronic device <NUM> may transmit a data packet including the third frame and the fourth frame, which are subsequent to the second frame, in the next even-numbered time interval. When the electronic device <NUM> is configured to transmit a data packet in each even-numbered time interval, the state of the electronic device <NUM> may be transitioned from the second state (e.g., an idle state or an inactive state) to the first state (e.g., a wake-up state or an active state) in the even-numbered time interval, and then the electronic device <NUM> may transmit a data packet; next, the state of the electronic device <NUM> may be transitioned to the first state until the next even-numbered time interval after transmission of the data packet. In another example, when the electronic device <NUM> is configured to transmit a data packet for each odd-numbered time interval, the state of the electronic device <NUM> may be transitioned from the second state (e.g., an idle state or an inactive state) to the first state (e.g., a wake-up state or an active state) in the odd-numbered time interval, and then the electronic device <NUM> may transmit a data packet; next, the state of the electronic device <NUM> may be transitioned to the first state until the next odd-numbered time interval after transmission of the data packet.

According to an embodiment, in the case where the electronic device <NUM> transmits a data packet as shown in <FIG>, when the electronic device <NUM> fails to transmit a data packet to the external electronic device <NUM>, the electronic device <NUM> may retransmit the data packet. For example, when an acknowledgment is not received from the external electronic device <NUM> or when a negative acknowledgment is received from the external electronic device <NUM>, the electronic device <NUM> may retransmit the data packet. According to an embodiment, the electronic device <NUM> may perform retransmission of the data packet within a time interval subsequent to the time interval in which the previous data packet is transmitted. For example, in the case where the electronic device <NUM> is configured to transmit a data packet for each even-numbered time interval, when the data packet transmitted in an even-numbered time interval is lost, the electronic device <NUM> may perform retransmission of data in the subsequent odd-numbered time interval. In another example, in the case where the electronic device <NUM> is configured to transmit a data packet for each odd-numbered time interval, when the data packet transmitted in an odd-numbered time interval is lost, the electronic device <NUM> may perform retransmission of data in the subsequent odd-numbered time interval.

<FIG> is a flowchart <NUM> of a method of outputting audio data, according to an embodiment.

According to an embodiment, the electronic device <NUM> may be an electronic device that communicates with an external electronic device (e.g., the external electronic device <NUM> of <FIG>). For example, the electronic device <NUM> may be an electronic device configured to communicate with the external electronic device <NUM> at specified time intervals (e.g., connection intervals). According to an embodiment, the electronic device <NUM> may be configured to receive data packets including audio data from the external electronic device <NUM> at specified time intervals.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may receive a first data packet including the first frame and the second frame from the external electronic device <NUM> in the first connection interval. For example, one frame may include audio data of a length corresponding to a single connection interval. The second frame may include audio data subsequent to the first frame in time. Each frame may include the encoded audio data.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may output an audio signal corresponding to the first frame using the first frame, in a time interval corresponding to the first connection interval. For example, the electronic device <NUM> may obtain an audio signal by decoding the first frame. According to an embodiment, in operation <NUM>, the electronic device <NUM> may buffer the second frame received in the first connection interval.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may determine whether to a second data packet in a second connection interval is received. For example, the electronic device <NUM> may determine whether the second data packet including the second frame and the third frame subsequent to the second frame is received in the second connection interval subsequent to the first connection interval. According to an embodiment, the electronic device <NUM> may determine whether the second data packet is successfully received, using a cyclic redundancy check (CRC) for the second data packet. For example, when the electronic device <NUM> fails the CRC for the second data packet, the electronic device <NUM> may determine that the second data packet is not received.

According to an embodiment, in operation <NUM>, when the second data packet is received, the electronic device <NUM> may output an audio signal corresponding to the second frame using the second frame included in the second data packet, in a time interval corresponding to the second connection interval. According to an embodiment, in operation <NUM>, the electronic device <NUM> may buffer the third frame included in the second data packet. For example, the electronic device <NUM> may flush away the previously buffered second frame from the buffer.

According to an embodiment, in operation <NUM>, when the second data packet is not received, the electronic device <NUM> may output an audio signal corresponding to the second frame using the second frame of the first data packet, in a time interval corresponding to the second connection interval. For example, the electronic device <NUM> may output an audio signal, using the second frame buffered in operation <NUM>.

In the embodiment of <FIG>, it may be assumed that the external electronic device <NUM> is configured to transmit data packet including a plurality of frames at each connection interval.

For example, the electronic device <NUM> may receive a data packet generated using a data packet format according to a communication specification (e.g., Bluetooth) for communication with the external electronic device <NUM>. For example, the electronic device <NUM> may receive a <NUM>-EV3 type data packet. The type of the data packet may be indicated by a field of the header of the packet (e.g., the TYPE <NUM> of <FIG>).

According to an embodiment, in operation <NUM>, the electronic device <NUM> may generate a plurality of frames with sizes corresponding to a specified time interval (e.g., connection interval) from the bit-stream. Operation <NUM> may be similar to operation <NUM> of <FIG>.

According to an embodiment, in operation <NUM>, the state of the electronic device <NUM> may be transitioned to a first state, and then the electronic device <NUM> may transmit a first data packet including a first frame and a second frame among a plurality of frames within a first connection interval. For example, the electronic device <NUM> may transmit the first data packet in the first state (e.g., active state or wake-up state). In another example, when the electronic device <NUM> is already operating in the first state in operation <NUM>, the electronic device <NUM> may transmit the first data packet while remaining in the first state.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may determine whether an acknowledgment ACK for the first data packet is received. For example, when "ACK" is not received from the external electronic device <NUM> within the specified time after the transmission of the first data packet, the electronic device <NUM> may determine that "ACK" for the first data packet is not received. In another example, when "NACK" for the first data packet is received from the external electronic device <NUM>, the electronic device <NUM> may determine that "ACK" is not received.

According to an embodiment, in operation <NUM>, when "ACK" for the first data packet is received, the state of the electronic device <NUM> may be transitioned from the first state (e.g., active state or wake-up state) to the second state (e.g., inactive state or idle state) in the second connection interval subsequent to the first connection interval. For example, the electronic device <NUM> may control at least part of a communication circuit (e.g., the communication module <NUM> of <FIG>) of the electronic device <NUM> to be in the second state.

According to an embodiment, in operation <NUM>, when "ACK" for the first data packet is not received, the electronic device <NUM> may retransmit the first data packet in the second connection interval subsequent to the first connection interval. In doing so, the electronic device <NUM> may operate in the first state in the second connection interval.

According to an embodiment, in operation <NUM>, the state of the electronic device <NUM> may be transitioned to the first state and then, the electronic device <NUM> may transmit a second data packet including the third frame and the fourth frame in the third connection interval subsequent to the second connection interval. For example, when an ACK is received, the state of the electronic device <NUM> may be transitioned to the second state; then, when the specified time interval (i.e. period of the second connection interval) elapses, the state of the electronic device <NUM> may be transitioned from the second state to the first state to transmit the second data packet, and then the electronic device <NUM> may transmit the second data packet. In another example, when "ACK" is not received, the electronic device <NUM> may transmit the second data packet while remaining in the first state. In this case, the transition to the first state in operation <NUM> may be omitted.

According to an embodiment, the electronic device <NUM> may generate a data packet using a data packet format according to a communication specification (e.g., Bluetooth) for communication with the external electronic device <NUM>. For example, the electronic device <NUM> may generate a <NUM>-EV3 type data packet including a plurality of frames. The type of the data packet may be indicated by a field of the header of the packet (e.g., the TYPE <NUM> of <FIG>). For example, a plurality of frames may correspond to pieces of continuous audio data. The electronic device <NUM> may transmit a data packet generated using a communication circuit, to the external electronic device <NUM>.

According to an embodiment, the electronic device <NUM> may transmit a data packet including a plurality of frames to the external electronic device <NUM>, in each even-numbered or odd-numbered time interval. For example, as described above with reference to <FIG>, the electronic device <NUM> may transmit a data packet including a plurality of frames in each odd-numbered connection interval. For example, the data packet may include a plurality of frames subsequent to the frames of the data packet transmitted in the previous time interval. When the electronic device <NUM> transmits a data packet including the first frame and the second frame in the previous even-numbered time interval, the electronic device <NUM> may transmit a data packet including the third frame and the fourth frame, which are subsequent to the second frame, in the next even-numbered time interval. When the electronic device <NUM> is configured to transmit a data packet in each even-numbered time interval, the state of the electronic device <NUM> may be transitioned from the second state (e.g., idle state or inactive state) to the first state (e.g., wake-up state or active state) in the even-numbered time interval, and then the electronic device <NUM> may transmit a data packet; next, the state of the electronic device <NUM> may be transitioned to the first state until the next even-numbered time interval after transmission of the data packet. In another example, when the electronic device <NUM> is configured to transmit a data packet for each odd-numbered time interval, the state of the electronic device <NUM> may be transitioned from the second state (e.g., idle state or inactive state) to the first state (e.g., wake-up state or active state) in the odd-numbered time interval, and then the electronic device <NUM> may transmit a data packet; next, the state of the electronic device <NUM> may be transitioned to the first state until the next odd-numbered time interval after transmission of the data packet.

According to an embodiment, an electronic device <NUM> may include a communication circuit (e.g., the communication module <NUM> of <FIG>), a processor (e.g., the processor <NUM> of <FIG>) operatively connected to the communication circuit, and a memory (e.g., the memory <NUM> of <FIG>) operatively connected to the processor. According to an embodiment, the memory may store instructions that, when executed, cause the processor to perform the actions of the electronic device <NUM> to be described. The processor may include a microprocessor or any suitable type of processing circuitry, such as one or more general-purpose processors (e.g., ARM-based processors), a Digital Signal Processor (DSP), a Programmable Logic Device (PLD), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), a Graphical Processing Unit (GPU), a video card controller, etc. In addition, it would be recognized that when a general purpose computer accesses code for implementing the processing shown herein, the execution of the code transforms the general purpose computer into a special purpose computer for executing the processing shown herein. Certain of the functions and steps provided in the Figures may be implemented in hardware, software or a combination of both and may be performed in whole or in part within the programmed instructions of a computer. No claim element herein is to be construed under the provisions of <NUM> U. §<NUM>(f), unless the element is expressly recited using the phrase "means for. " In addition, an artisan understands and appreciates that a "processor" or "microprocessor" may be hardware in the claimed disclosure. Under the broadest reasonable interpretation, the appended claims are statutory subject matter in compliance with <NUM> U.

According to an embodiment, the electronic device <NUM> may obtain audio data, may encode the audio data using a specified codec to generate a plurality of frames each having a size corresponding to a single connection interval; and may transmit a first data packet including a first frame and a second frame subsequent to the first frame among the plurality of frames to an external electronic device <NUM> in a first connection interval.

According to an embodiment, the electronic device <NUM> may be configured to communicate with the external electronic device <NUM> according to a Bluetooth communication specification, using the communication circuit. For example, the specified codec may be a codec having the compression rate of <NUM> kilobits per second (kbps).

According to an embodiment, when executed, the instructions may cause the processor to transmit a data packet to the external electronic device <NUM> at a period corresponding to the connection interval, using the communication circuit. For example, the data packet may be a <NUM>-extended voice3 (<NUM>-EV3) type packet.

According to an embodiment, when executed, the instructions may cause the processor to transmit a second data packet including the second frame and a third frame subsequent to the second frame among the plurality of frames to the external device in a second connection interval subsequent to the first connection interval.

According to an embodiment, when executed, the instructions may cause the processor to transmit a data packet to the external electronic device <NUM> at a doubled period of the connection interval, using the communication circuit. According to an embodiment, when executed, the instructions may cause the processor to control the communication circuit to be in a first state during a connection interval in which a data packet is transmitted and in a second state during a connection interval in which a data packet is not transmitted. For example, the power consumption of the first state (e.g., active or wake-up state) may be higher than the power consumption of the second state (e.g., inactive or idle state).

According to an embodiment, when executed, the instructions may cause the processor of the electronic device <NUM> to obtain audio data, to encode the audio data using a specified codec to generate a plurality of frames each having a size corresponding to a single connection interval, and to transmit a first data packet including two or more frames among the plurality of frames to an external electronic device at a first specified time interval, using the communication circuit. For example, a second data packet transmitted in a second specified time interval includes at least one frame that is same as one of the two or more frames included in the first data packet transmitted in the first specified time interval preceding the second specified time interval.

According to an embodiment, the electronic device <NUM> may be configured to communicate with the external electronic device <NUM> according to a Bluetooth communication specification, using a communication circuit (e.g., the communication module <NUM> of <FIG>) of the electronic device <NUM>. For example, the specified codec may be a codec having the compression rate of <NUM> kilobits per second (kbps). For example, the data packet may be a <NUM>-extended voice3 (<NUM>-EV3) type packet. For example, the length of the connection interval may be <NUM>. For example, the second data packet may include a first frame and a second frame subsequent to the first frame.

According to an embodiment, when executed, the instructions may cause the processor to obtain the audio data by receiving a wireless signal including the audio data using a communication circuit.

According to an embodiment, a data transmitting method of the electronic device <NUM> may include obtaining audio data, encoding the audio data using a specified codec to generate a plurality of frames each having a size corresponding to a single connection interval, transmitting a first data packet including a first frame and a second frame subsequent to the first frame among the plurality of frames to an external electronic device in a first connection interval, and transmitting a second data packet including the second frame and a third frame subsequent to the second frame to the external electronic device in a second connection interval subsequent to the first connection interval.

According to an embodiment, an electronic device (e.g., the external electronic device <NUM> of <FIG>) may include a speaker (e.g., the sound output device <NUM> of <FIG>), a communication circuit (e.g., the communication module <NUM> of <FIG>), a processor (e.g., the processor <NUM> of <FIG>) operatively connected to the communication circuit, and/or a memory (e.g., the memory <NUM> of <FIG>) operatively connected to the communication module <NUM> and the processor. For example, the memory may store one or more instructions that, when executed, cause the processor to perform the operations to be described.

According to an embodiment, the processor may receive first data (e.g., the first data packet <NUM> of <FIG>) including a first audio frame corresponding to a first interval (e.g., T1 of <FIG>) and a second audio frame corresponding to a second interval (e.g., T2 of <FIG>) subsequent to the first interval, using the communication circuit (e.g., operation <NUM> of <FIG>) The processor may store the second audio frame in the memory in response to reception of the first data. The processor may output a first audio signal generated based on the first audio frame, through the speaker (e.g., operation <NUM> of <FIG>). When second data (e.g., the second data packet <NUM> of <FIG>) including the second audio frame and a third audio frame corresponding to a third interval subsequent to the second interval is received using the communication circuit (e.g., operation <NUM> of <FIG>), the processor may store the third audio frame in the memory and output a second audio signal generated based on the second audio frame of the second data through the speaker (e.g., operation <NUM> of <FIG>). When at least part of the second data is not received using the communication circuit (e.g., operation <NUM> of <FIG>), the processor may output a second audio signal generated based on the second audio frame of the first data stored in the memory, through the speaker (e.g., operation <NUM> of <FIG>).

According to an embodiment, after at least part of the second data is not received, the processor may receive third data including the third audio frame and a fourth audio frame corresponding to a fourth interval subsequent to the third interval, using the communication circuit. For example, when at least part of the second data is not received, the processor may receive the third data without a request for retransmission of the second data or without receiving the second data.

For example, a length of the first audio signal may correspond to a length of the first interval, and a length of the second audio signal may correspond to a length of the second interval.

For example, each of the first data and the second data may correspond to a single data packet according to a Bluetooth communication specification. For example, a type of the data packet may be <NUM>-extended voice3 (<NUM>-EV3).

According to an embodiment, the processor may receive the data packet at a period corresponding to the first interval, using the communication circuit.

Wherein, the term "non-transitory storage medium" means a tangible device, and does not include a signal (e.g., an electromagnetic wave), but this term does not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium. For example, "the non-transitory storage medium" may include a buffer where data is temporally stored.

The computer program product (e.g., downloadable app)) may be distributed in the form of a machine-readable storage medium (e.g., compact disc read only memory (CD-ROM)), or be distributed (e.g., downloaded or uploaded) online via an application store (e.g., PlayStore™), or between two user devices (e.g., smart phones) directly.

Certain of the above-described embodiments of the present disclosure can be implemented in hardware, firmware or via the execution of software or computer code that can be stored in a recording medium such as a CD ROM, a Digital Versatile Disc (DVD), a magnetic tape, a RAM, a floppy disk, a hard disk, or a magneto-optical disk or computer code downloaded over a network originally stored on a remote recording medium or a non-transitory machine readable medium and to be stored on a local recording medium, so that the methods described herein can be rendered via such software that is stored on the recording medium using a general purpose computer, or a special processor or in programmable or dedicated hardware, such as an ASIC or FPGA. As would be understood in the art, the computer, the processor, microprocessor controller or the programmable hardware include memory components, e.g., RAM, ROM, Flash, etc. that may store or receive software or computer code that when accessed and executed by the computer, processor or hardware implement the processing methods described herein.

Claim 1:
An electronic device (<NUM>) comprising:
a speaker;
a communication circuit;
a processor operatively connected to the speaker and the communication circuit; and
a memory operatively connected to the processor, wherein the memory stores one or more instructions that, when executed, cause the processor to:
receive (<NUM>), from an external electronic device (<NUM>), a first data packet including a first audio frame including first audio data with a length corresponding to a first connection interval and a second audio frame including second audio data with a length corresponding to a second connection interval subsequent to the first connection interval, using the communication circuit;
store the second audio frame in the memory in response to reception of the first data packet;
output a first audio signal generated based on the first audio frame, through the speaker;
when a second data packet including the second audio frame and a third audio frame corresponding to a third connection interval subsequent to the second connection interval is received using the communication circuit, store the third audio frame in the memory and output a second audio signal generated based on the second audio frame of the second data packet through the speaker and flush away the second audio frame of the first data packet from the memory; and
when at least part of the second data packet is not received using the communication circuit, output the second audio signal generated based on the second audio frame of the first data packet stored in the memory, through the speaker,
wherein the electronic device (<NUM>) is configured to communicate with the external electronic device (<NUM>) according to Bluetooth communication protocol, and
wherein a type of each of the first data packet and the second data packet is a type of the data packet is <NUM>-extended voice3, <NUM>-EV3.