プロジェクトデザイン

Project Design

オーディオ信号またはオーディオデータを処理する機能を備えたプロジェクトを設計する場合、通常、次のコンポーネントのサブセットを検討します:

When designing a project with ability to process an audio signal or audio data we typically consider a subset of the following components:

入力:

Input:
  • 接続するためのアナログ信号入力(例: マイク
    Analog signal input to connect e.g. a microphone
  • ストレージメディア、例: それらを読み取るためのオーディオファイルを備えたmicroSDカード
    Storage media, e.g. microSD card with audio files to read them
  • インターネットからオーディオデータストリームを取得するためのWI-Fiインターフェース
    WI-Fi interface to obtain an audio data stream from the internet
  • オーディオデータストリームを取得するためのBluetoothインターフェイス。 BTヘッドセット
    Bluetooth interface to obtain an audio data stream from e.g. a BT headset
  • コーデックチップからオーディオデータストリームを取得するためのI2Sインターフェイス
    I2S interface to obtain audio data stream from a codec chip
  • インターネットからオーディオデータストリームを取得するためのイーサネットインターフェイス
    Ethernet interface to obtain an audio data stream from the internet
  • 再生するオーディオサンプルを含む内部チップのフラッシュメモリ
    An internal chip’s flash memory with some audio samples to play
  • ユーザーインターフェース(例: ボタンまたはユーザー入力を提供するその他の手段
    User Interface e.g. buttons or some other means to provide user input

出力:

Output:
  • ヘッドホンやアンプとスピーカーを接続するアナログ信号出力
    Analog signal output to connect headphones or and amplifier with speakers
  • ストレージメディア、例: いくつかのオーディオファイルを書き込むためのmicroSDカード。 録音付き
    Storage media, e.g. microSD card to write some audio files, e.g. with recording
  • オーディオデータストリームをインターネットに送信するためのWI-Fiインターフェース
    WI-Fi interface to send out an audio data stream to the internet
  • オーディオデータをストリーミングするためのBluetoothインターフェース BTヘッドセット
    Bluetooth interface to stream audio data to e.g. a BT headset
  • 一部のデータをコーデックチップにストリーミングするためのI2Sインターフェイス
    I2S interface to stream some data to a codec chip
  • オーディオデータストリームをインターネットにストリーミングするためのイーサネットインターフェイス
    Ethernet interface to stream an audio data stream to the internet
  • オーディオ録音を保存するための内部チップのフラッシュメモリ
    An internal chip’s flash memory to store some audio recording
  • ユーザーインターフェース(例: ディスプレイ、LED、または触覚フィードバックの何らかの手段
    User Interface e.g. a display, LEDs or some means of haptic feedback

メインプロセッシングユニット:

Main Processing Unit:

入力からデータを読み取り、処理(エンコード/エンコードなど)して出力に送信する処理能力を備えたマイクロコントローラーまたはコンピューター。

A microcontroller or a computer with processing power to read the data from the input, process (e.g. encode / encode) and send to the output.

プロジェクトオプション

Project Options

ESP32は、上記のすべての機能を備えているか、それらをサポートできます(たとえば、イーサネットPHYを駆動できます)。 ESP32のコストが約3ドルであり、ESP-ADFソフトウェア開発プラットフォームが利用可能であることを考慮すると、最小限の追加コンポーネントで非常に低価格でオーディオプロジェクトを開発できます。

The ESP32 has all the above features or is able to support them (e.g. can drive Ethernet PHY). Considering the ESP32 cost is about $3, and availability of ESP-ADF software development platform, we are able to develop an audio project with minimum additional components at very low price.

アプリケーション、必要な機能、パフォーマンスに応じて、2つのプロジェクトグループを検討する場合があります。

Depending on the application, required functionality and performance, we may consider two project groups.
  • 最小 - 出力に高品質のオーディオが必要ない場合は、オンボードI2S、またはPDMインターフェイスとDACを使用することを前提として、最小限の追加コンポーネントを使用します。
    Minimum - having minimum additional components, assuming using on board I2S, or PDM interface as well as DAC, if no high qualify audio on the output is required.
  • 典型的 - 高品質の出力オーディオと複数の入力/出力オプションのための外部コーデックチップとパワーアンプを備えています。
    Typical - with an external codec chip and a power amplifier, for high quality output audio and multiple input / output options.

機能/コンポーネントを追加または削除することにより、上記のプロジェクト間にいくつかのバリエーションがある場合があります。 以下はいくつかの例です。

There may be several variation between the above projects, by adding or removing features / components. Below are couple of examples.

プロジェクトの最小値

Project Minimum

ESP32にいくつかの周辺機器がある場合、I2SまたはPDMまたはDACインターフェイスを使用して最小限のプロジェクトを実装できます。 デジタルマイクを使用すると、音声信号を入力し、クラウドサービスと通信できるコマンド音声制御プロジェクトの最小値を構築できます。

With several peripherals on ESP32, I2S or PDM or DAC interfaces can be used to implement a minimum project. With the digital microphones, we could input voice signals and build a command voice control project minumum that could communicate with a cloud service.
Audio Project Example - Send Voice Commands to Cloud Service

Audio Project Example - Send Voice Commands to Cloud Service

2つのオンボードDACを使用して、出力の8ビット幅で十分な場合は、別のプロジェクトの最小値、つまりインターネットに接続された無線を再生するデバイスを実装できます。

With two on board DACs, if 8-bit width on the output is satisfactory, we may implement another project minimum - a device to play an internet connected radio.
Audio Project Example - Internet Connected Radio Player

Audio Project Example - Internet Connected Radio Player

典型的なプロジェクト

Typical Project

より良いオーディオ品質とより多くのインターフェースオプションを探すときは、外部I2Sコーデックを使用してすべてのアナログ入力および出力信号処理を行います。 コーデックチップは、タイプに応じて、オーディオ入力信号プリアンプ、ヘッドフォン出力アンプ、複数のアナログ入力および出力、サウンドエフェクトなどの追加機能を提供する場合があります。I2Sは、オーディオコーデックチップとのインターフェイスの業界標準と見なされています。 オーディオデータの高速で連続的な転送に一般的です。 オーディオデータ処理のパフォーマンスを最適化するには、追加のメモリが必要になる場合があります。 このような場合は、ESP32チップと一緒に単一モジュールで4MBのPSRAMを提供するESP32-WROVERの使用を検討してください。

When looking for better audio quality and more interfacing options we would use an external I2S codec to do all the analog input and output signal processing. The codec chip, depending on type, may provide additional functionality like audio input signal preamplifier, headphone output amplifier, multiple analog input and outputs, sound effects, etc. The I2S is considered as the industry standard for interfacing with audio codec chips, or in general for a high speed, continuous transfer of the audio data. To optimize performance of audio data processing additional memory may be required. For such cases consider using ESP32-WROVER that provides 4 MB PSRAM on a single module together with the ESP32 chip.
Typical Audio Project Example

Typical Audio Project Example

ESP-ADFは、主にコーデックチップを使用したプロジェクトをサポートするように設計されています。 ESP32 LyraTボードは、そのようなプロジェクトの例です。 ボードとのインターフェースをとるソフトウェアは、AudioHALとドライバーによって行われます。 ESP32 LyraTで使用されているコーデックチップはES8388です。 異なるコーデックチップを搭載したボードは、異なるドライバを提供することでサポートされる場合があります。

The ESP-ADF is designed primarily to support projects with a codec chip. The ESP32 LyraT board is an example of such a project. The software interfacing with the board is done by Audio HAL and a driver. The codec chip used on the ESP32 LyraT is ES8388. Boards with a different codec chip may be supported by providing a different driver.