Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jorgerance/fcf5b61849a10b0d06e5ded80ce1f744 to your computer and use it in GitHub Desktop.
Save jorgerance/fcf5b61849a10b0d06e5ded80ce1f744 to your computer and use it in GitHub Desktop.
install-opencv-2.4.13-ubuntu-16.04.sh
# opencv dependencies
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y build-essential cmake libgtk2.0-dev pkg-config python-numpy python-dev libavcodec-dev libavformat-dev libswscale-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev unzip
sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2 libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils
# download opencv-2.4.13
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.13/opencv-2.4.13.zip
unzip opencv-2.4.13.zip
cd opencv-2.4.13 && mkdir release && cd release
# compile and install
cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/bin/g++ CMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_TBB=ON -DBUILD_NEW_PYTHON_SUPPORT=ON -DWITH_V4L=ON -DINSTALL_C_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DWITH_OPENGL=ON -DBUILD_FAT_JAVA_LIB=ON -DINSTALL_TO_MANGLED_PATHS=ON -DINSTALL_CREATE_DISTRIB=ON -DINSTALL_TESTS=ON -DENABLE_FAST_MATH=ON -DWITH_IMAGEIO=ON -DBUILD_SHARED_LIBS=OFF -DWITH_GSTREAMER=ON ..
make all -j2 # 2 threads
sudo make install
@Avi-TelnT
Copy link

I am looking to hire an ESP32 Python programmer to helping me to develop a firework
interface for ESP32 I2S for mic on I2S ICS-43434 IC and play wav using I2S MAX98357A IC. The target is work needed Google speech recognition and Google text to speech from ESP32.
The development environment must be https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo
If you have an experience on ESP32 MicroPython_ESP32_psRAM_LoBo Python please reply my email [email protected]
And call my Skype nissim.test
The work is mile stone based and payment will be as mile stone below,
We will provide the hardware for that :

  1. Expose to LoBO Python the ESP32-IDE /MicroPython/Tools/esp-idf/components/driver/include/driver/I2S.H and I2S.C by integrate them in machine module so dir(machine) will show the I2S interface and commands to set I2S for recording and playing using the ESP32 DMA.
  2. Use the above machine.I2S to record and play a wav file a digital mic on
    I2S ICS-43434 IC and play wav using MAX98357A IC
  3. Make an audio PTT (Push-To-Talk) instead of PCB button. By detecting the rising level on the recoded audio level, ok voice key word recognized.
  4. Doing above but record and play from ram with Flak encoding as needed by Google SR AND TTS. See https://cloud.google.com/speech-to-text/docs/encoding
  5. I need to use SR to get the recognized the Mic audio, as text reterun from google back to ESP32, modify the return text with meaningful information and send to be played by Goggl TTS. Like Siri. With ESP32.
    As:
    You Say to Mic I2S ICS-43434 “What is the temperature now?”
    Get back the text in ESP32 Python “What is the temperature now”
    ESP32 Send to TTS “The temperature now is 30 degree”
    The return wav or Flak been play to using MAX98357A over I2S
  6. So, I believe to expose I2S code from ESP32 C to Python will not be a big work.
    a. Google API use wav Audio Encoding name: FLAC Free Lossless Audio Codec 16-bit or 24-bit required for streams.
    b. So, FLAC can be done in C or Python. But interface must be from Python. See https://goo.gl/mtrwVN
  7. Maybe this is a good source for FLAC in C https://goo.gl/cCYFTh
    Contact :
    Nissim Zur
    [email protected]
    Skype: nissim.test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment