-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3586529
Showing
5 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/venv/ | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.8 | ||
|
||
RUN apt-get update && apt-get install -y ffmpeg alsa-utils | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
COPY requirements.txt requirements.txt | ||
RUN python3.8 -m pip install --upgrade pip | ||
RUN python3.8 -m pip install -r requirements.txt | ||
COPY . . | ||
|
||
|
||
CMD ["python3.8", "main.py"] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Play audiosample | ||
import os | ||
audio_filename = "file_example_MP3_2MG.mp3" | ||
os.system(f"ffplay -nodisp -autoexit -loglevel quiet {audio_filename}") | ||
|
||
# Capture image | ||
import cv2 | ||
camera_capture = cv2.VideoCapture(0) | ||
rv, image = camera_capture.read() | ||
print(f"Image Dimensions: {image.shape}") | ||
|
||
# Capture audio sample | ||
print("Start recording audio") | ||
sample_name = "aaaa.wav" | ||
os.system(f"arecord -vv --format=cd --duration=10 {sample_name}") | ||
os.system(f"ffplay -nodisp -autoexit -loglevel quiet {sample_name}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
opencv-python | ||
numpy | ||
ffmpeg-python |