{"id":5330,"date":"2019-12-16T16:20:19","date_gmt":"2019-12-16T07:20:19","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=5330"},"modified":"2019-12-16T16:20:19","modified_gmt":"2019-12-16T07:20:19","slug":"%e6%84%8f%e5%a4%96%e3%81%a8%e7%b0%a1%e5%8d%98%ef%bc%81%e9%9f%b3%e3%82%92%e6%84%9f%e7%9f%a5%e3%81%97%e3%81%a6%e9%8c%b2%e7%94%bb%e3%81%99%e3%82%8b%e7%9b%a3%e8%a6%96%e3%82%ab%e3%83%a1%e3%83%a9%e3%82%92","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=5330","title":{"rendered":"\u610f\u5916\u3068\u7c21\u5358\uff01\u97f3\u3092\u611f\u77e5\u3057\u3066\u9332\u753b\u3059\u308b\u76e3\u8996\u30ab\u30e1\u30e9\u3092\u3064\u304f\u308b\uff08Python\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u8a18\u4e8b<a href=\"https:\/\/blog.capilano-fw.com\/?p=5321\">JavaScript\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u3066\u308b\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5<\/a>\u3067\u306f\u3001\u300c\u30d8\u30c3\u30c9\u30ec\u30b9Chrome\u300d\u3092\u4f7f\u3063\u305f\u95a2\u4fc2\u304b\u3089\u4e45\u3057\u3076\u308a<code>Node.js<\/code>\u3092\u4f7f\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u306e\u8a18\u4e8b\u3092\u516c\u958b\u3057\u305f\u5f8c\u3044\u3064\u3082\u306e<code>PHP<\/code>\u3084<code>JavaScript<\/code>\u4ee5\u5916\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3082\u9762\u767d\u304b\u3063\u305f\u306e\u3067\u3001\u4eca\u56de\u306e\u8a18\u4e8b\u3082\u4e45\u3057\u3076\u308a\u306b<code>Python<\/code>\u3092\u4f7f\u3063\u305f\u5185\u5bb9\u3092\u304a\u5c4a\u3051\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u5185\u5bb9\u3068\u306f\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u97f3\u3092\u611f\u77e5\u3057\u3066\u9332\u753b\u3059\u308b\u76e3\u8996\u30ab\u30e1\u30e9\u3092\u3064\u304f\u308b<\/strong><\/p>\n<p>\u3067\u3059\uff01<\/p>\n<p>\u5b9f\u3092\u3044\u3046\u3068\u3053\u306e\u6a5f\u80fd\u306f\u30d6\u30e9\u30a6\u30b6\u5074\u306e<code>JavaScript<\/code>\u3067\u5b9f\u88c5\u3067\u304d\u308c\u3070\u3001\u3068\u8003\u3048\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u30a6\u30a7\u30d6\u4e0a\u3092\u63a2\u3057\u3066\u3082\u3046\u307e\u304f\u3044\u304d\u305d\u3046\u306a\u60c5\u5831\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u958b\u767a\u305b\u305a\u300c\u7f6e\u3044\u3068\u304f\u300d\u6a5f\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u5c11\u3057\u524d\u306b\u3053\u308c\u304c<code>Python<\/code>\u3060\u3068\u610f\u5916\u3068\u7c21\u5358\u306b\u5b9f\u88c5\u304c\u3067\u304d\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u306e\u3067\u3053\u3053\u3067\u7686\u3055\u3093\u3068\u5171\u6709\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u7acb\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3566 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png\" alt=\"\" width=\"306\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1-287x300.png 287w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Python 2.7<\/p>\n<h1>\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p>\u4ee5\u4e0b\uff12\u3064\u306e\u6a5f\u80fd\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001\u305d\u308c\u305e\u308c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u9332\u753b\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000OpenCV2<\/li>\n<li>\u5165\u529b\u3055\u308c\u305f\u97f3\u3092\u76e3\u8996\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000SoundDevice<\/li>\n<\/ul>\n<p>\u30d1\u30c3\u30b1\u30fc\u30b8\u306f<code>pip<\/code>\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>pip install opencv-python\npip install sounddevice<\/strong><\/pre>\n<h1>\u6e96\u5099<\/h1>\n<p>\u4eca\u56de\u306f<code>camera.py<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>python camera.py<\/strong><\/pre>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u3067\u4f5c\u6210\u3059\u308b\u9332\u753b\u30d5\u30a1\u30a4\u30eb\u306f\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u4f5c\u6210\u3057\u305f<code>movies<\/code>\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u6a29\u9650\u306e\u95a2\u4fc2\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u3082\u8003\u3048\u3089\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u3082\u4f5c\u6210\u3057\u66f8\u304d\u8fbc\u307f\u6a29\u9650\u3092\u4e0e\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5331\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/sound_surveillance_1.png\" alt=\"\" width=\"400\" height=\"123\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/sound_surveillance_1.png 400w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/sound_surveillance_1-300x92.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<h1>\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304f<\/h1>\n<p>\u3067\u306f\u3053\u3053\u304b\u3089<code>Python<\/code>\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304f\u90e8\u5206\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u3082\u30b3\u30fc\u30c9\u306f\u77ed\u3081\u306a\u306e\u3067\u3001\u57fa\u672c\u30b3\u30fc\u30c9\u306e\u4e2d\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u756a\u53f7\u3092\u5f8c\u3067\u7d39\u4ecb\u3059\u308b\u30b3\u30fc\u30c9\u306b\u5165\u308c\u66ff\u3048\u3066\u3044\u3051\u3070\u5168\u3066\u5b8c\u6210\u3059\u308b\u300c\u5b66\u7fd2\u96d1\u8a8c\u306e\u4ed8\u9332\u300d\u5f62\u5f0f\u3067\u304a\u5c4a\u3051\u3057\u307e\u3059\ud83d\ude0a\u2728<\/p>\n<h2>\u57fa\u672c\u306e\u30b3\u30fc\u30c9<\/h2>\n<p>\u307e\u305a\u306f\u57fa\u672c\u30b3\u30fc\u30c9\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u72ec\u81ea\u30af\u30e9\u30b9<code>SoundSurveillance<\/code>\u3092\u4f5c\u3063\u3066\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<pre>#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n\n<strong>import cv2\nimport time\nfrom datetime import datetime\nimport numpy as np\nimport sounddevice as sd\n\nclass SoundSurveillance:\n\n    # \u5b9a\u6570\u3068\u5909\u6570\u3000\u30fb\u30fb\u30fb\u3000\u2460\n\n    # \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3000\u30fb\u30fb\u30fb\u3000\u2461\n\n    # \u97f3\u3092\u76e3\u8996\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000\u2462\n\n    # \u9332\u753b\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000\u2463\n\nss = SoundSurveillance()<\/strong><\/pre>\n<h2>\u5b9a\u6570\u3068\u5909\u6570\u3000\u30fb\u30fb\u30fb\u3000\u2460<\/h2>\n<p>\u3067\u306f\u3001\u30af\u30e9\u30b9\u5185\u3067\u5fc5\u8981\u306b\u306a\u308b\u5b9a\u6570\u3068\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre># \u5b9a\u6570\u3068\u5909\u6570\u3000\u30fb\u30fb\u30fb\u3000\u2460\n<strong>DURATION = 3<\/strong>\n<strong>VOLUME_THRESHOLD = 100<\/strong>\n<strong>recording = False<\/strong><\/pre>\n<p><code>DURATION<\/code>\u306f\u3001\u97f3\u304c\u306a\u3063\u305f\u3068\u304d\u306b\u9332\u753b\u3059\u308b\u79d2\u6570\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001\u4f8b\u3048\u3070\u98fc\u3044\u72ac\u3084\u732b\u306e\u69d8\u5b50\u3092\u64ae\u5f71\u3057\u305f\u3044\u5834\u5408\u306f\u3082\u3046\u5c11\u3057\u9577\u3044\u6642\u9593\u306b\u3059\u308b\u3068\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001<code>VOLUME_THRESHOLD<\/code>\u306f\u3001\u3044\u308f\u3086\u308b\u300c\u3057\u304d\u3044\u5024\u300d\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u3067\u3001\u3053\u308c\u3068\u4eca\u9cf4\u3063\u3066\u3044\u308b\u97f3\u306e\u5927\u304d\u3055\u3092\u6bd4\u3079\u3066\u9332\u753b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5225\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><code>recording<\/code>\u306f\u5909\u6570\u3067\u3001\u3044\u307e\u9332\u753b\u4e2d\u304b\u3069\u3046\u304b\u304c\u5206\u304b\u308b\u3088\u3046\u306b<code>True<\/code>\u3068<code>False<\/code>\u304c\u5165\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3000\u30fb\u30fb\u30fb\u3000\u2461<\/h2>\n<p>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u3001\u4e00\u756a\u6700\u521d\u306b\u5b9f\u884c\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u306e\u3067\u3001\u3053\u3053\u3067\u6b21\u306e\u9805\u76ee\u3067\u3064\u304f\u308b\u300c\u97f3\u3092\u76e3\u8996\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u300d<code>listen_sound()<\/code>\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre># \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3000\u30fb\u30fb\u30fb\u3000\u2461\n<strong>def __init__(self):<\/strong>\n<strong>    self.listen_sound()<\/strong><\/pre>\n<h2>\u97f3\u3092\u76e3\u8996\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000\u2462<\/h2>\n<p>\u97f3\u3092\u76e3\u8996\u3059\u308b\u90e8\u5206\u306f\u30e1\u30bd\u30c3\u30c9\u304c\uff12\u3064\u3067\u3059\u3002<\/p>\n<pre># \u97f3\u3092\u76e3\u8996\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000\u2462\n<strong>def listen_sound(self):<\/strong>\n<strong>    duration = 60  # \u97f3\u58f0\u30c1\u30a7\u30c3\u30af\u3092\u4e00\u6642\u7684\u306b\u7d9a\u3051\u308b\u79d2\u6570<\/strong>\n<strong>    while True:<\/strong>\n<strong>        with sd.InputStream(callback=self.detect_sound):<\/strong>\n<strong>            sd.sleep(duration * 1000)<\/strong>\n\n<strong>def detect_sound(self, indata, frames, time, status):<\/strong>\n<strong>    if self.recording == False:<\/strong>\n<strong>        volume = np.linalg.norm(indata) * 10<\/strong>\n<strong>        if volume &gt; self.VOLUME_THRESHOLD:<\/strong>\n<strong>            self.recording = True<\/strong>\n<strong>            self.start_recording()<\/strong><\/pre>\n<p>\u307e\u305a\u3001\u5148\u307b\u3069\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u547c\u3073\u51fa\u3057\u3066\u3044\u305f<code>listen_sound()<\/code>\u3067\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u6700\u521d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8<code>SoundDevice<\/code>\u3092\u4f7f\u3063\u3066\u5165\u529b\u97f3\u58f0\u3092\u53d6\u5f97\u3057\u3066\u307e\u3059\u3002\u4eca\u56de\u306f60\u79d2\u3054\u3068\u306b\u4f55\u5ea6\u3082\u97f3\u58f0\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u53d6\u5f97\u3057\u305f\u97f3\u58f0\u30c7\u30fc\u30bf\u304b\u3089\u300c\u5927\u304d\u3044\u97f3\u304c\u306a\u3063\u305f\u304b\u3069\u3046\u304b\u300d\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3001\u9332\u753b\u3092\u5b9f\u884c\u3059\u308b\u304b\u3069\u3046\u304b\u5224\u5225\u3057\u3066\u3044\u308b\u306e\u304c<code>detect_sound()<\/code>\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001<code>indata<\/code>\u3068\u547c\u3070\u308c\u308b\u5909\u6570\u306e\u4e2d\u306b\u97f3\u58f0\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u5143\u306b\u3057\u3066\u9cf4\u3063\u3066\u3044\u308b\u97f3\u306e\u97f3\u91cf\uff08<code>volume<\/code>\uff09\u3092\u53d6\u5f97\u3001\u3055\u3089\u306b\u2460\u306e\u9805\u76ee\u3067\u8a2d\u5b9a\u3057\u305f<code>VOLUME_THRESHOLD<\/code>\u3068\u6bd4\u8f03\u3057\u3066\u3001\u305d\u308c\u3088\u308a\u5927\u304d\u306a\u6570\u5024\u3060\u3063\u305f\u3089\u9332\u753b\u3092\u958b\u59cb\u3059\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u9332\u753b\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000\u2463<\/h2>\n<p>\u3067\u306f\u6700\u5f8c\u306b\u4eca\u56de\u306e\u30e1\u30a4\u30f3\u3001\u9332\u753b\u3059\u308b\u90e8\u5206\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre># \u9332\u753b\u3059\u308b\u90e8\u5206\u3000\u30fb\u30fb\u30fb\u3000\u2463\n<strong>def start_recording(self):<\/strong>\n\n<strong>    self.recording = True<\/strong>\n<strong>    save_path = '.\/movies\/'+ datetime.now().strftime('%Y%m%d%H%M%S') +'.avi'<\/strong>\n<strong>    print('Recording...('+ save_path +')')<\/strong>\n\n<strong>    cap = cv2.VideoCapture(0)<\/strong>\n\n<strong>    # \u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306e\u30b5\u30a4\u30ba\u3092\u53d6\u5f97\u3059\u308b<\/strong>\n<strong>    f_width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))<\/strong>\n<strong>    f_height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))<\/strong>\n\n<strong>    fourcc = cv2.VideoWriter_fourcc(*'XVID')<\/strong>\n<strong>    video_writer = cv2.VideoWriter(save_path, fourcc, 25, (f_width, f_height))<\/strong>\n\n<strong>    started_time = time.time()<\/strong>\n\n<strong>    # \u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306e\u6620\u50cf\u3092\u4fdd\u5b58<\/strong>\n<strong>    while(cap.isOpened()):<\/strong>\n<strong>        ret, frame = cap.read()<\/strong>\n<strong>        diff_time = time.time() - started_time<\/strong>\n<strong>        if ret == False or diff_time &gt;= self.DURATION:<\/strong>\n<strong>            break<\/strong>\n<strong>        else:<\/strong>\n<strong>            video_writer.write(frame)<\/strong>\n\n<strong>    cap.release()<\/strong>\n<strong>    video_writer.release()<\/strong>\n<strong>    cv2.destroyAllWindows()<\/strong>\n<strong>    self.recording = False<\/strong>\n<strong>    print('Recording finished.')<\/strong><\/pre>\n<p>\u5c11\u3057\u3060\u3051\u30b3\u30fc\u30c9\u304c\u9577\u3044\u3067\u3059\u304c\u3001\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u3001<code>OpenCV<\/code>\u3067\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306b\u30a2\u30af\u30bb\u30b9\u3057\uff11\u30b3\u30de\u305a\u3064\u6620\u50cf\u3092\u4fdd\u5b58\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u9332\u753b\u306f\u2460\u306e\u4f5c\u696d\u3066\u8ffd\u52a0\u3057\u305f<code>DURATION<\/code>\uff08\u9332\u753b\u3059\u308b\u79d2\u6570\uff09\u3092\u8d85\u3048\u308b\u3068\u81ea\u52d5\u7684\u306b\u7d42\u4e86\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>if ret == False or <strong>diff_time &gt;= self.DURATION<\/strong>:\n    break<\/pre>\n<h2>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h2>\n<p>\u3067\u306f\u3001\u7c21\u5358\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u305f\u7d50\u679c\u3067\u3059\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u8d77\u52d5\u3057\u3066\u97f3\u304c\u306a\u308b\u5ea6\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300cRecording&#8230;\u300d\u3068\u300cRecording finished\u300d\u304c\u8868\u793a\u3055\u308c<code>movies<\/code>\u306b\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5332\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/sound_surveillance_2.png\" alt=\"\" width=\"376\" height=\"71\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/sound_surveillance_2.png 376w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/sound_surveillance_2-300x57.png 300w\" sizes=\"auto, (max-width: 376px) 100vw, 376px\" \/><\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<h2>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h2>\n<p>\u4eca\u56de\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b \u305f\u3060\u3057\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u306e\u4f5c\u6210\u306a\u3069\u306f\u3054\u81ea\u8eab\u3067\u7528\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=5333&amp;tmstv=1777532615\" rel=\"nofollow\" id=\"download-link-5333\" data-redirect=\"false\" >\n\t\u97f3\u3092\u611f\u77e5\u3057\u3066\u9332\u753b\u3059\u308b\u76e3\u8996\u30ab\u30e1\u30e9<\/a>\n\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4e45\u3057\u3076\u308a<code>Python<\/code>\u3092\u4f7f\u3063\u3066\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u3042\u308b\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001<code>function xxxx() {<\/code> &#8230;. \u3068\u66f8\u3044\u305f\u3068\u3053\u308d\u3067\u300c\u9055\u3063\u305f\uff01\u3053\u308c<code>Python<\/code>\u3058\u3083\u306a\u3044\u30fb\u30fb\u30fb\ud83d\ude2b\u300d\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff08\u7b11\uff09<\/p>\n<p>\u3061\u306a\u307f\u306b\u4eca\u56de\u306f\u79c1\u304c\u30e1\u30a4\u30f3\u3067\u4f7f\u3063\u3066\u3044\u308b<code>Ubuntu 18.04<\/code>\u3067\u5b9f\u884c\u3057\u307e\u3057\u305f\u304c\u3001<code>Python<\/code>\u306f\u69d8\u3005\u306aOS\u3067\u5b9f\u884c\u3067\u304d\u308b\u306e\u3067\u3001\u5c0f\u578bPC\u306e<code>Raspberry Pi<\/code>\u306a\u3069\u3067\u5b9f\u88c5\u3057\u3066\u76e3\u8996\u30ab\u30e1\u30e9\u3092\u3064\u304f\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p>\u203b \u306a\u304a\u3001\u4eca\u56de\u306e\u6a5f\u80fd\u3092\u3064\u304f\u308a\u305f\u304f\u306a\u3063\u305f\u306e\u306f\u3001\u5b9f\u306f\u30c6\u30ec\u30d3\u756a\u7d44\u3067\u300c\u7d76\u6ec5\u3057\u305f\u52d5\u7269\u3092\u898b\u3064\u3051\u3088\u3046\uff01\u300d\u3068\u3044\u3046\u4f01\u753b\u3067\u97f3\u58f0\u306b\u53cd\u5fdc\u3059\u308b\u76e3\u8996\u30ab\u30e1\u30e9\u3092\u4f7f\u3063\u3066\u3044\u305f\u3053\u3068\u304c\u767a\u7aef\u3067\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-461 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/38.png\" alt=\"\" width=\"294\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/38.png 294w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/38-276x300.png 276w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u8a18\u4e8bJavaScript\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u3066\u308b\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\u3067\u306f\u3001\u300c\u30d8\u30c3\u30c9\u30ec\u30b9Chrome\u300d\u3092\u4f7f\u3063\u305f\u95a2\u4fc2\u304b\u3089\u4e45\u3057\u3076\u308aNode.js\u3092 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=5330\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u610f\u5916\u3068\u7c21\u5358\uff01\u97f3\u3092\u611f\u77e5\u3057\u3066\u9332\u753b\u3059\u308b\u76e3\u8996\u30ab\u30e1\u30e9\u3092\u3064\u304f\u308b\uff08Python\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":5338,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[163,195,196],"class_list":["post-5330","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-163","tag-195","tag-196"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5330"}],"version-history":[{"count":2,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5330\/revisions"}],"predecessor-version":[{"id":5337,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5330\/revisions\/5337"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/5338"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}