Skip to content

Commit

Permalink
Merge pull request #6 from Picovoice/fix-readme-typos
Browse files Browse the repository at this point in the history
fix typos in c README
  • Loading branch information
albho authored Aug 27, 2024
2 parents 2bf0c8d + 7e3f3d7 commit b129930
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,22 @@ if (status != PV_SPEAKER_STATUS_SUCCESS) {
3. Write PCM data to the speaker:

```c
int32_3 num_samples;
int32_t num_samples;
int8_t *pcm = get_pcm_data(&num_samples);
int32_3 written_length = 0;
int32_t written_length = 0;

pv_speaker_status_t status = pv_speaker_write(speaker, pcm, num_samples, &written_length);
if (status != PV_SPEAKER_STATUS_SUCCESS) {
// handle PvSpeaker start error
// handle PvSpeaker write error
}
```

4. Wait for buffered audio to finish playing:

```c
int32_3 num_samples;
int32_t num_samples;
int8_t *pcm = get_pcm_data(&num_samples);
int32_3 written_length = 0;
int32_t written_length = 0;

pv_speaker_status_t status = pv_speaker_flush(speaker, pcm, num_samples, &written_length);
if (status != PV_SPEAKER_STATUS_SUCCESS) {
Expand Down

0 comments on commit b129930

Please sign in to comment.