{"id":489,"date":"2025-06-30T23:42:02","date_gmt":"2025-06-30T15:42:02","guid":{"rendered":"https:\/\/yhsbj.cn\/?p=489"},"modified":"2025-07-04T19:41:19","modified_gmt":"2025-07-04T11:41:19","slug":"esp32max98357%e5%81%9a%e7%bd%91%e7%bb%9c%e9%9f%b3%e7%ae%b1","status":"publish","type":"post","link":"https:\/\/yhsbj.cn\/index.php\/2025\/06\/30\/489\/","title":{"rendered":"esp32+max98357\u505a\u7f51\u7edc\u97f3\u7bb1"},"content":{"rendered":"\n<p>1.\u4ecegithub\u4e0b\u8f7d\u6e90\u7801\u7528zip\u65b9\u5f0f\uff0c<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\" data-type=\"URL\" data-id=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\" target=\"_blank\">https:\/\/github.com\/pschatzmann\/arduino-audio-tools<\/a><\/p>\n\n\n\n<p>2.\u5bfc\u5165\u5230Arduino IDE\uff0c\u9879\u76ee-&gt;\u5bfc\u5165\u5e93-&gt;\u6dfb\u52a0.zip\u5e93<\/p>\n\n\n\n<p>3.\u6839\u636e\u9700\u8981\u89e3\u7801\u7684\u97f3\u9891\u4e0b\u8f7d\u5b89\u88c5\u5bf9\u5e94\u7684\u5e93\uff0c\u53c2\u8003\u6587\u6863<a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/wiki\/Encoding-and-Decoding-of-Audio\" data-type=\"URL\" data-id=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/wiki\/Encoding-and-Decoding-of-Audio\">https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/wiki\/Encoding-and-Decoding-of-Audio<\/a><\/p>\n\n\n\n<p>4.\u9700\u8981\u7684\u6750\u6599: esp32\u5f00\u53d1\u677f\u3001Max98357\u3001\u5587\u53ed<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-3 is-cropped\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"948\" height=\"1024\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185432_12-2-948x1024.jpg\" alt=\"\" data-id=\"490\" data-full-url=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185432_12-2.jpg\" data-link=\"https:\/\/yhsbj.cn\/?attachment_id=490\" class=\"wp-image-490\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185432_12-2-948x1024.jpg 948w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185432_12-2-278x300.jpg 278w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185432_12-2-768x830.jpg 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185432_12-2.jpg 1179w\" sizes=\"(max-width: 948px) 100vw, 948px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"773\" height=\"1024\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185440_11-1-773x1024.jpg\" alt=\"\" data-id=\"491\" data-full-url=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185440_11-1.jpg\" data-link=\"https:\/\/yhsbj.cn\/?attachment_id=491\" class=\"wp-image-491\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185440_11-1-773x1024.jpg 773w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185440_11-1-227x300.jpg 227w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185440_11-1-768x1017.jpg 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185440_11-1-1160x1536.jpg 1160w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185440_11-1.jpg 1179w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"978\" height=\"1024\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185443_10-1-978x1024.jpg\" alt=\"\" data-id=\"492\" data-full-url=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185443_10-1.jpg\" data-link=\"https:\/\/yhsbj.cn\/?attachment_id=492\" class=\"wp-image-492\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185443_10-1-978x1024.jpg 978w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185443_10-1-287x300.jpg 287w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185443_10-1-768x804.jpg 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_20250626185443_10-1.jpg 1175w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>5.\u63a5\u7ebf<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-2 is-cropped\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185053_295-1-768x1024.jpg\" alt=\"\" data-id=\"493\" data-full-url=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185053_295-1.jpg\" data-link=\"https:\/\/yhsbj.cn\/?attachment_id=493\" class=\"wp-image-493\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185053_295-1-768x1024.jpg 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185053_295-1-225x300.jpg 225w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185053_295-1-1152x1536.jpg 1152w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185053_295-1.jpg 1280w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185108_964-1-768x1024.jpg\" alt=\"\" data-id=\"494\" data-full-url=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185108_964-1.jpg\" data-link=\"https:\/\/yhsbj.cn\/?attachment_id=494\" class=\"wp-image-494\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185108_964-1-768x1024.jpg 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185108_964-1-225x300.jpg 225w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185108_964-1-1152x1536.jpg 1152w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-26_185108_964-1.jpg 1280w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>6.\u5c06\u4ee3\u7801\u70e7\u5f55\u5230esp32\uff0c\u8fd9\u91cc\u6211\u7528Mp3\u89e3\u7801\uff0c\u56e0\u4e3a\u76f4\u63a5\u8bfbmp3\u6587\u4ef6\u4e0d\u7528\u8f6c\u7801\uff0c\u5982\u679c\u662f\u4ece\u9ea6\u514b\u98ce\u4e4b\u7c7b\u7684\u91c7\u96c6\u97f3\u9891\u6570\u636e\u7684\u8bdd\u4e00\u822c\u662fPCM\u6570\u636e\uff0cPCM\u6570\u636e\u5efa\u8bae\u4f7f\u7528Opus\u7f16\u7801<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#include \"AudioTools.h\"\n#include &lt;WiFi.h>\n#include &lt;WiFiUdp.h>\n#include \"AudioTools\/AudioCodecs\/CodecMP3Helix.h\"\n\nWiFiUDP udp;\nconst int localPort = 12345;\nconst int BUFFER_SIZE = 1024;\nuint8_t buffer[BUFFER_SIZE];\n\nI2SStream i2s;                                            \/\/I2S\u6d41\nVolumeStream volume(i2s);                                 \/\/\u97f3\u91cf\u6d41\nEncodedAudioStream dec(&amp;volume, new MP3DecoderHelix());  \/\/Opus\u89e3\u7801\u6d41\n\nvoid setup() {\n  Serial.begin(115200);\n  WiFi.mode(WIFI_AP);                     \/\/WIFI\u70ed\u70b9\u6a21\u5f0f\n  WiFi.softAP(\"test\", \"123456789\");       \/\/\u8d26\u53f7\u5bc6\u7801\n\n  auto cfg = i2s.defaultConfig(TX_MODE);  \/\/\u8f93\u51fa\u6a21\u5f0f\n  cfg.sample_rate = 48000;                \/\/\u91c7\u6837\u7387\n  cfg.channels = 2;                       \/\/\u901a\u9053\n  cfg.bits_per_sample = 16;               \/\/\n  cfg.pin_bck = 26;                       \/\/esp32\u768426\u5f15\u811a\u63a5max98357\u7684BCLK\n  cfg.pin_ws = 25;                        \/\/esp32\u768425\u5f15\u811a\u63a5max98357\u7684LRC\n  cfg.pin_data = 22;                      \/\/esp32\u768422\u5f15\u811a\u63a5max98357\u7684DIN\n  i2s.begin(cfg);\n\n  auto dcfg = i2s.defaultConfig();\n  dcfg.copyFrom(cfg);\n  dec.begin(dcfg);\n\n  auto vcfg = volume.defaultConfig();\n  vcfg.copyFrom(cfg);\n  volume.begin(vcfg);\n  volume.setVolume(0.7);  \/\/\u8bbe\u7f6e\u97f3\u91cf\n\n  udp.begin(localPort);\n  IPAddress IP = WiFi.softAPIP();\n  Serial.print(\"AP IP address: \");\n  Serial.println(IP);                           \/\/\u4ece\u4e32\u53e3\u4e2d\u6253\u5370\u672c\u673aIP\n}\n\nvoid loop() {\n  int packetSize = udp.parsePacket();           \/\/\u68c0\u67e5\u662f\u5426\u6709udp\u6570\u636e\u5305\u5e76\u8fd4\u56de\u6570\u636e\u5305\u5927\u5c0f\n  if (packetSize) {\n    int len = udp.read(buffer, BUFFER_SIZE);    \/\/\u4eceudp\u6570\u636e\u5305\u8bfb\u53d6\u6570\u636e\n    dec.write(buffer, len);\/\/\u5c06\u6570\u636e\u5199\u5165\u5230Opus\u89e3\u7801\u6d41\u4e2d\n  }\n}<\/pre>\n\n\n\n<p>7.\u8fd9\u91ccesp32\u4f7f\u7528\u4e86\u70ed\u70b9\u6a21\u5f0f\uff0c\u7535\u8111wifi\u8fde\u63a5\u70ed\u70b9\uff0c\u7136\u540e\u6253\u5f00\u4e32\u53e3\u770b\u4e0besp32\u7684ip<\/p>\n\n\n\n<p>8.\u4e0b\u8f7dffmpeg\uff0c\u4f7f\u7528\u547d\u4ee4\u63a8\u6d41mp3\uff0c<span class=\"has-inline-color has-vivid-red-color\">\u8bb0\u5f97\u5c06ip\u6539\u4e3a\u4f60esp32\u7684ip\uff0c\u8fd8\u67092.mp3\u4e5f\u8981\u6539\u6210\u4f60\u7535\u8111\u4e0a\u7684mp3\u6587\u4ef6<\/span>\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ffmpeg -re -i 2.mp3 -c:a libmp3lame -vn -ar 48000 -ac 2  -f mp3 udp:\/\/192.168.4.1:12345<\/pre>\n\n\n\n<p>9.\u8fd9\u91cc\u7ed9\u51fa\u5b89\u5353\u4ee3\u7801\u53c2\u8003\uff0c<span class=\"has-inline-color has-vivid-red-color\">\u4ee3\u7801\u53ea\u662f\u7b80\u5355\u4f5c\u4e3a\u53c2\u8003\uff0c\u4e0d\u80fd\u5b9e\u9645\u4f7f\u7528\uff0c\u5176\u4e2d\u539f\u56e0\u4e4b\u4e00\u662f\u7ebf\u7a0b\u4f11\u7720\u4e0d\u7cbe\u51c6\uff0c\u9700\u8981\u4f7f\u7528\u9ad8\u7cbe\u5ea6\u5b9a\u65f6\u5668\u6216\u8005\u591a\u5a92\u4f53\u5b9a\u65f6\u5668<\/span>\uff0c<span class=\"has-inline-color has-vivid-red-color\">\u4ee3\u7801\u91cc\u7684mp3\u6587\u4ef6\u6211\u5148\u5b58http\u670d\u52a1\uff0c\u53ef\u4ee5\u9009\u62e9\u5148\u653esd\u5361\u518d\u8bfb\u53d6\uff0c\u4e00\u51712\u4e2aip\uff0c\u4e00\u4e2a\u662f\u672c\u673a\u8bfb\u53d6mp3\u6587\u4ef6\u7684ip\uff0c\u4e00\u4e2a\u662fesp32\u7684ip\uff0c\u672c\u673aip\u4e0d\u80fd\u4f7f\u7528127.0.0.1<\/span><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">package com.example.myapplication\n\nimport android.app.Activity\nimport android.media.MediaExtractor\nimport android.media.MediaFormat\nimport android.os.Bundle\nimport android.util.Log\nimport androidx.activity.ComponentActivity\nimport androidx.activity.compose.setContent\nimport androidx.activity.enableEdgeToEdge\nimport androidx.compose.foundation.layout.Box\nimport androidx.compose.foundation.layout.Column\nimport androidx.compose.foundation.layout.fillMaxSize\nimport androidx.compose.foundation.layout.padding\nimport androidx.compose.material3.Button\nimport androidx.compose.material3.Scaffold\nimport androidx.compose.material3.Slider\nimport androidx.compose.material3.Text\nimport androidx.compose.runtime.Composable\nimport androidx.compose.runtime.getValue\nimport androidx.compose.runtime.mutableFloatStateOf\nimport androidx.compose.runtime.mutableStateOf\nimport androidx.compose.runtime.remember\nimport androidx.compose.ui.Alignment\nimport androidx.compose.ui.Modifier\nimport androidx.compose.ui.platform.LocalContext\nimport androidx.compose.ui.tooling.preview.Preview\nimport com.example.myapplication.ui.theme.MyApplicationTheme\nimport java.io.IOException\nimport java.net.DatagramPacket\nimport java.net.DatagramSocket\nimport java.net.InetAddress\nimport java.nio.ByteBuffer\nimport androidx.compose.foundation.layout.fillMaxWidth\nimport androidx.compose.runtime.setValue\nimport androidx.compose.ui.unit.dp\n\n\nclass MainActivity : ComponentActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        enableEdgeToEdge()\n        setContent {\n            MyApplicationTheme {\n                Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->\n                    Greeting(\n                        name = \"Android\",\n                        modifier = Modifier.padding(innerPadding)\n                    )\n                }\n            }\n        }\n\n    }\n}\n\n@Composable\nfun Greeting(name: String, modifier: Modifier = Modifier) {\n    val context = LocalContext.current\n    val activity = context as Activity\n    val isButtonEnabled = remember { mutableStateOf(true) }\n    var sliderPosition by remember { mutableStateOf(0f) }\n    var isSeek = remember { mutableStateOf(false) }\n\n    Box(modifier = Modifier.fillMaxSize().padding(10.dp),\n        contentAlignment = Alignment.Center){\n        Column {\n            Slider(value = sliderPosition,\n                onValueChange = { sliderPosition = it },\n                valueRange = 0f..1f,\n                onValueChangeFinished = {\n                    synchronized(isSeek){\n                        isSeek.value = true\n                    }\n                }\n            )\n            Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center){\n                Button(enabled = isButtonEnabled.value, onClick = {\n                    isButtonEnabled.value = false;\n                    Thread {\n                        val socket = DatagramSocket()\n                        val IPAddress = InetAddress.getByName(\"192.168.4.1\")\n                        var port = 12345;\n                        var previousPresentationTimeUs = 0L\n\n                        try {\n                            val extractor = MediaExtractor()\n                            extractor.setDataSource(\"http:\/\/192.168.4.2:8012\/2.mp3\")\n                            val buffer = ByteBuffer.allocate(500 * 1024)\n                            var sampleSize = 0;\n                            extractor.selectTrack(0);\n                            val format: MediaFormat = extractor.getTrackFormat(0)\n                            var duration = format.getLong(MediaFormat.KEY_DURATION);\n\n                            while(true){\n                                if(isSeek.value){\n                                    isSeek.value = false\n                                    extractor.seekTo((duration.toFloat() * sliderPosition.toFloat()).toLong(), MediaExtractor.SEEK_TO_CLOSEST_SYNC);\n                                    previousPresentationTimeUs = 0\n                                }\n\n                                sampleSize = extractor.readSampleData(buffer, 0)\n                                if (sampleSize &lt;= 0) {\n                                    break\n                                }\n                                val mp3Frame = ByteArray(sampleSize.toInt())\n                                buffer.rewind()\n                                buffer.get(mp3Frame)\n\n                                val presentationTimeUs = extractor.sampleTime\n\n                                activity.runOnUiThread {\n                                    sliderPosition =  (extractor.sampleTime.toFloat() \/ duration.toFloat()).coerceIn(0F, 100F)\n                                }\n\n                                var timeDiffMs = 0L\n                                if (previousPresentationTimeUs > 0) {\n                                    timeDiffMs = (presentationTimeUs - previousPresentationTimeUs) \/ 1000\n                                    Thread.sleep(timeDiffMs-1)\n                                }\n                                previousPresentationTimeUs = presentationTimeUs\n\n                                val sendPacket = DatagramPacket(mp3Frame, mp3Frame.size, IPAddress, port)\n                                socket.send(sendPacket)\n                                extractor.advance()\n                            }\n                        } catch (e: IOException) {\n                            e.printStackTrace()\n                        }\n                        activity.runOnUiThread {\n                            isButtonEnabled.value = true;\n                        }\n                    }.start()\n                }) {\n                    Text(\"esp32\u64ad\u653emp3\")\n                }\n            }\n        }\n    }\n}\n\n@Preview(showBackground = true)\n@Composable\nfun GreetingPreview() {\n    MyApplicationTheme {\n        Greeting(\"Android\")\n    }\n}<\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u5b89\u5353\u8fd0\u884c\u6548\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-2 is-cropped\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234040_732-768x1024.jpg\" alt=\"\" data-id=\"495\" data-full-url=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234040_732.jpg\" data-link=\"https:\/\/yhsbj.cn\/?attachment_id=495\" class=\"wp-image-495\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234040_732-768x1024.jpg 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234040_732-225x300.jpg 225w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234040_732-1152x1536.jpg 1152w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234040_732.jpg 1280w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234046_524-768x1024.jpg\" alt=\"\" data-id=\"496\" data-full-url=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234046_524.jpg\" data-link=\"https:\/\/yhsbj.cn\/?attachment_id=496\" class=\"wp-image-496\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234046_524-768x1024.jpg 768w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234046_524-225x300.jpg 225w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234046_524-1152x1536.jpg 1152w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2025\/06\/\u5fae\u4fe1\u56fe\u7247_2025-06-30_234046_524.jpg 1280w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u4ece\u9ea6\u514b\u98ce\u8bfb\u53d6PCM\u6570\u636e\u7528Opus\u800c\u4e0d\u7528Mp3\uff0c\u539f\u56e0\u4e4b\u4e00\u5c31\u662f\u7f51\u7edc\u4f20\u8f93\uff0c\u5e76\u4e14\u4e2a\u4eba\u611f\u89c9\u89e3\u7801opsu\u64ad\u653e\u6bd4\u89e3\u7801mp3\u64ad\u653e\u8981\u5feb\u4e00\u4e9b\uff0c\u5f53\u7136\u8fd9\u662f\u5728esp32\u6d4b\u8bd5\u7684\uff0c\u7535\u8111\u4e0a\u7f16\u89e3\u7801\u97f3\u9891\u8017\u65f6\u51e0\u4e4e\u5ffd\u7565\u4e0d\u8ba1\uff0c\u89c6\u9891\u7f16\u89e3\u7801\u5219\u80fd\u7528GPU\u7f16\u89e3\u7801\u5c31\u7528<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td><strong>\u5bf9\u6bd4\u9879<\/strong><\/td><td><strong>Opus<\/strong><\/td><td><strong>MP3<\/strong><\/td><\/tr><tr><td><strong>\u538b\u7f29\u6548\u7387<\/strong><\/td><td>\u9ad8\uff08\u4f4e\u7801\u7387\u97f3\u8d28\u66f4\u597d\uff09<\/td><td>\u4e2d\uff08\u4f4e\u7801\u7387\u6613\u5931\u771f\uff09<\/td><\/tr><tr><td><strong>\u97f3\u8d28<\/strong><\/td><td>\u5bbd\u9891\u8868\u73b0\u4f73\uff0c\u8bed\u97f3 \/ \u97f3\u4e50\u6df7\u5408\u66f4\u81ea\u7136<\/td><td>\u4e2d\u9ad8\u7801\u7387\u97f3\u8d28\u7a33\u5b9a\uff0c\u4f4e\u7801\u7387\u5dee<\/td><\/tr><tr><td><strong>\u7801\u7387\u8303\u56f4<\/strong><\/td><td>6kbps &#8211; 510kbps\uff08\u7075\u6d3b\u53ef\u8c03\uff09<\/td><td>32kbps &#8211; 320kbps\uff08\u5e38\u89c1 128kbps+\uff09<\/td><\/tr><tr><td><strong>\u4e13\u5229<\/strong><\/td><td>\u5f00\u6e90\uff08\u514d\u8d39\uff09<\/td><td>\u53d7\u4e13\u5229\u4fdd\u62a4\uff08\u9700\u4ed8\u8d39\uff09<\/td><\/tr><tr><td><strong>\u517c\u5bb9\u6027<\/strong><\/td><td>\u73b0\u4ee3\u8bbe\u5907\u652f\u6301\u597d\uff0c\u65e7\u8bbe\u5907\u53ef\u80fd\u53d7\u9650<\/td><td>\u5168\u5e73\u53f0\u517c\u5bb9\uff08\u51e0\u4e4e\u6240\u6709\u8bbe\u5907\u652f\u6301\uff09<\/td><\/tr><tr><td><strong>\u5e94\u7528\u573a\u666f<\/strong><\/td><td>\u5b9e\u65f6\u901a\u4fe1\uff08\u89c6\u9891\u4f1a\u8bae\u3001\u76f4\u64ad\u3001VoIP\uff09\u3001\u7f51\u7edc\u97f3\u9891\u6d41\uff08\u5982\u6e38\u620f\u8bed\u97f3\uff09<\/td><td>\u97f3\u4e50\u5b58\u50a8\u64ad\u653e\u3001\u97f3\u9891\u6587\u4ef6\u5171\u4eab\u3001\u4f20\u7edf\u591a\u5a92\u4f53\u5185\u5bb9<\/td><\/tr><tr><td><strong>\u6587\u4ef6\u5927\u5c0f<\/strong><\/td><td>\u540c\u97f3\u8d28\u4e0b\u66f4\u5c0f<\/td><td>\u540c\u97f3\u8d28\u4e0b\u66f4\u5927<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1.\u4ecegithub\u4e0b\u8f7d\u6e90\u7801\u7528zip\u65b9\u5f0f\uff0chttps:\/\/github.com\/pschatzmann\/ardu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[58,67],"tags":[59,68],"_links":{"self":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/489"}],"collection":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":4,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":502,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/489\/revisions\/502"}],"wp:attachment":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}