Introducing the Baidu Keyboard — a DIY smart keyboard that blends mechanical key switches with voice control, AI integration, and slick custom firmware. It’s the perfect side project for tech lovers, makers, and anyone who wants to push their keyboard beyond QWERTY.
At its core, it’s a custom mechanical keyboard—but with a major upgrade. By integrating Baidu’s AI voice tools and smart features (think voice input, real-time translation, or macro automation), this project gives you a keyboard that can type and talk back.
It's like Siri met a gaming keyboard—and they decided to get productive.
Let’s break down the toolkit. You might already have a few of these lying around:
✅ Microcontroller: Raspberry Pi Pico or Arduino Pro Micro
✅ Keyboard PCB: Hot-swappable QMK-compatible PCB (DZ60, GK61)
✅ Mechanical Switches: 61 or 87 key switches (Gateron or Cherry MX)
✅ Keycaps: Standard ANSI layout
✅ Mic Module: USB mic or Baidu DuerOS-compatible array
✅ Wi-Fi Module (Optional): ESP8266/ESP32 for advanced features
✅ OLED Display (Optional): SSD1306 128x32 I2C
✅ Enclosure: Acrylic or 3D-printed case
✅ USB-C Cable: For data/power
✅ Diodes: 1N4148 (if you’re wiring the matrix yourself)
Soldering iron & solder
Tweezers, wire stripper, and cutters
Multimeter (for testing connections)
Hot glue (optional for securing parts)
Computer with QMK Toolbox, Arduino IDE, and Python installed
Let’s roll up our sleeves and build this beauty:
Clean surface ✅
Tools within reach ✅
Anti-static precautions ✅
Laptop ready with QMK and Python ✅
Pro tip: Use a helping hand tool or small vice for holding the PCB while soldering. You’ll thank yourself later.
Download your preferred layout from QMK Configurator
Compile and flash it to your microcontroller using QMK Toolbox
If you’re using Pico or ESP32, use CircuitPython or Arduino IDE
Optional: Enable RGB, media keys, or OLED output in your firmware.
Pop in your switches on the PCB (if it’s hot-swappable)
Test each switch using QMK or a multimeter
Solder them only if the board isn’t hot-swappable
Add stabilizers and keycaps
Connect your mic module via USB or I2S (ESP32)
Use Python and the Baidu SDK:
bash
CopyEdit
pip install baidu-aip
Get your Baidu API key from ai.baidu.com
Write a script to capture audio and send it to Baidu’s ASR (speech recognition)
Display the text on an OLED screen, or even auto-type it back into your computer
“Translate ‘Hello’ to Chinese” → boom, your keyboard does it.
Press Fn + R to trigger a voice recording
Speak clearly and wait for the OLED to respond
Test voice commands, translations, and macros
Add safety checks—like LED feedback or error messages
Want to take it even further? Try these add-ons:
🌐 Wi-Fi Features: Use ESP32 to fetch weather, send data to Google Sheets, or update firmware remotely
🔋 Battery-Powered Mode: Add a Li-ion battery + TP4056 charging circuit
🎨 Custom RGB Lighting: Addressable LEDs with effects via QMK
🔉 Voice Macros: “Open YouTube” = Ctrl + T + type URL
📱 Bluetooth Pairing: Use BLE HID with an ESP32 board
The Baidu Keyboard is more than just a DIY gadget—it's a bridge between hardware, AI, and creative automation. You’ll walk away with:
A functional, custom mechanical keyboard
New skills in firmware flashing, API integration, and electronics
A fun talking point (literally) for your desk
Fun Fact: Baidu’s speech recognition is widely used in smart cars and voice assistants across China—now you’re bringing it to your keyboard.
So, what are you waiting for?
Grab your soldering iron, flash some firmware, and give your keyboard a voice.
Have questions or want STL files, wiring diagrams, or the full Python code? Let me know—I’ve got your back