You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-81Lines changed: 13 additions & 81 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ Some basic __header-only C++ classes__ that can be used for __Audio Processing__
13
13
- TimerAlarmRepeating (e.g. for sampling audio data using exact times) [ESP32 only]
14
14
- A Wav Encoder and Decoder
15
15
- AudioOutputWithCallback class to provide callback integration e.g. with ESP8266Audio
16
+
- Building of Arduino Audio Sketches to be run on [Linux, Windows and OS/X](https://github.com/pschatzmann/arduino-audio-tools/wiki/Running-an-Audio-Sketch-on-the-Desktop)
16
17
17
18
This functionality provides the glue which makes different audio processing components and libraries work together.
18
19
We also provide plenty of examples that demonstrate how to implement the different scenarios. The __design philosophy__ is based on the Arduino conventions: we use the ```begin()``` and ```end()``` methods to start and stop the processing and we propagate the __use of Streams__. We all know the [Arduino Streams](https://pschatzmann.github.io/arduino-audio-tools/html/class_stream.html): We usually use them to write out print messages and sometimes we use them to read the output from Serial devices. The same thing applies to “Audio Streams”: You can read audio data from “Audio Sources” and you write them to “Audio Sinks”.
@@ -71,66 +72,12 @@ void loop(){
71
72
```
72
73
A complete list of the supported Audio Stream classes and scenarios can be found in the [Scenarios Document](Scenarios.md)
73
74
74
-
### Sound Output
75
+
### Examples
75
76
76
-
-__I2SStream__: The best quality can be achieved with the help of I2S and an external DAC. I2S is supporting 2 channels only.
77
-
-__AnalogAudioStream__: Some processors are providing an analog output, this is usually an easy and good approach: The number of pins (and herewith output channels) however is usually very limited.
78
-
-__PWMAudioStream__: The last possibility is to simulate an analog output with the help of PWM by using a frequency which is beyond the audible range of 20 KHz. This method is supported by all processors and usually supports a bigger number of output pins. In terms of audio quality this is usually the worst option.
77
+
Further examples can be found in the [wiki](https://github.com/pschatzmann/arduino-audio-tools/wiki/Examples)!
79
78
80
79
81
-
## Examples
82
-
83
-
The examples follow the following naming convention: "scenario type"-"source"-"destination". For the scenario types we might have __base__ (using basic api functionality), __stream__ for examples using Streams and __test__ for the test cases.
84
-
85
-
For the __source__ we currently have __adc__ for analog input devices like analog microphones, __i2s__ for digital input devices (e.g. digital microphones), __file__ for SD files and __a2dp__ for input from Bluetooth A2DP (e.g. from a Mobile Phone).
86
-
87
-
For the __destination__ we use __dac__ for analog output (e.g. to an amplifier), __i2s__ for digital output devices (e.g. an external DAC), __file__ for SD files and __a2dp__ for output to Bluetooth A2DP (e.g. a Bluetooth Speaker).
88
-
89
-
90
-
Here is the list of examples:
91
-
92
-
#### Stream API
93
-
94
-
Here are a couple of simple test sketches to demo different output destinations:
95
-
96
-
-[streams-generator-serial](examples/streams-generator-serial) Displaying generated sound on the Serial Plotter
97
-
-[streams-generator-i2s](examples/streams-generator-i2s) Output of generated sound on external DAC via I2S
98
-
-[streams-generator-dac](examples/streams-generator-dac) Output of generated sound on ESP32 internal DAC via I2S
99
-
-[streams-generator-a2dp](examples/streams-generator-a2dp) Output of generated sound on Bluetooth Speaker using A2DP
100
-
-[streams-generator-pwm](examples/streams-generator-pwm) Output of generated sound with PWM
101
-
-[streams-adc-serial](examples/streams-adc-serial) Displaying input from analog microphone on the Serial Plotter
102
-
-[streams-memory_wav-serial](examples/streams-memory_wav-serial) Decoding of WAV from Flash memory and display on the Serial Plotter
103
-
104
-
And some more useful examples:
105
-
106
-
-[streams-memory_raw-i2s](examples/streams-memory_raw-i2s) - Play music form Flash Memory via I2S to External DAC
107
-
-[streams-url_raw-serial](examples/streams-url_raw-serial) Displaying a music file from the internet on the Serial Plotter
108
-
-[streams-url_raw-I2S.ino](examples/streams-url_raw-i2s) Streaming a File from the Internet to on external DAC via I2S
109
-
-[streams-url_wav-i2s](examples/streams-url_wav-i2s) Text to Speach example using Rhasspy
110
-
111
-
... these are just a few examples, but you can combine any Input Stream with any Output Stream as you like...
112
-
113
-
#### Basic API
114
-
115
-
-[base-adc-serial](basic-api/base-adc-serial) - Sample analog sound and write it to Serial
116
-
-[base-adc-a2dp](basic-api/base-adc-a2dp) - Sample analog sound and write it to a A2DP Bluetooth source
117
-
-[base-file_raw-serial](basic-api/base-file_raw-serial) - Read Raw File from SD card to and write it to Serial
118
-
-[base-file_raw-a2dp](basic-api/base-file_raw-a2dp) - Read Raw File from SD card write it A2DP Bluetooth
119
-
-[base-file_mp3-a2dp](basic-api/base-file_mp3-a2dp) - Stream MP3 File from SD card to A2DP Bluetooth using the ESP8266Audio library
120
-
-[base-i2s-serial](basic-api/base-i2s-serial) - Sample digital sound and write it to Serial
121
-
-[base-i2s-a2dp](basic-api/base-i2s-a2dp) - Sample analog sound and write it to a A2DP Bluetooth source
122
-
123
-
#### Listening to the Result with a Webbrowser
124
-
125
-
I am also providing a simple webserver which can render the audio data as wav result.
126
-
Here are some examples:
127
-
128
-
-[streams-generator-webserver_wav](examples/streams-generator-webserver_wav) A Webserver which renders some generated sound
129
-
-[streams-sam-webserver_wav](examples/streams-sam-webserver_wav) A Webserver which renders the result from the SAM TTS engine
130
-
-[streams-tts-webserver_wav](examples/streams-tts-webserver_wav) A Webserver which renders the result from the Arduino TTS engine
131
-
-[streams-flite-webserver_wav](examples/streams-flite-webserver_wav) A Webserver which renders the result from the Flite TTS engine
132
-
133
-
#### Logging
80
+
### Logging
134
81
135
82
The application uses a built in logger (see AudioLogger.h and AudioConfig.h). You can e.g. deactivate the logging by changing USE_AUDIO_LOGGING to false in the AudioConfig.h:
136
83
@@ -146,8 +93,7 @@ Per default we use the log level warning and the logging output is going to Seri
Dependent on the example you might need to install some of the following libraries:
153
99
@@ -160,34 +106,20 @@ Dependent on the example you might need to install some of the following librari
160
106
-[TTS](https://github.com/pschatzmann/TTS) A Text to Speach Engine
161
107
-[flite](https://github.com/pschatzmann/arduino-flite) A Text to Speach Engine
162
108
163
-
## Installation
164
-
165
-
You can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with
166
-
167
-
```
168
-
cd ~/Documents/Arduino/libraries
169
-
git clone pschatzmann/arduino-audio-tools.git
170
-
171
-
```
172
109
173
-
## Documentation
110
+
###Documentation
174
111
175
112
Here is the generated [Class documentation](https://pschatzmann.github.io/arduino-audio-tools/html/annotated.html).
176
113
177
114
You also might find further information in [one of my blogs](https://www.pschatzmann.ch/home/category/machine-sound/)
178
115
179
-
## Project Status
180
116
181
-
This is currently work in progress:
117
+
### Installation
118
+
119
+
You can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with
0 commit comments