This file contains hidden or 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
| { | |
| "[python]": { | |
| "editor.codeActionsOnSave": { | |
| "source.fixAll.ruff": "explicit", | |
| "source.organizeImports": "explicit", | |
| "source.organizeImports.ruff": "explicit" | |
| }, | |
| "editor.defaultFormatter": "charliermarsh.ruff", | |
| "editor.formatOnPaste": false, | |
| "editor.formatOnSave": true, |
This file contains hidden or 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
| import audioread | |
| import glob | |
| import json | |
| import os | |
| from google.cloud import speech | |
| from google.cloud.speech import enums | |
| from google.cloud.speech import types | |
| x = os.path.dirname(os.path.realpath(__file__)) | |
| x = os.path.join(x, "*.flac") |
This file contains hidden or 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
| import youtube_dl | |
| ydl_opts = { | |
| "format": | |
| "bestaudio", | |
| "outtmpl": | |
| "%(title)s.%(ext)s", | |
| "postprocessors": [{ | |
| "key": "FFmpegExtractAudio", | |
| "preferredcodec": "flac", |
This file contains hidden or 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
| import re | |
| import audioread | |
| from google.cloud import speech | |
| from google.cloud.speech import enums | |
| from google.cloud.speech import types | |
| AUDIO_CHANNELS = 2 | |
| AUDIO_RATE = 16000 | |
| BLOB_PATH = "audio.flac" | |
| BUCKET_NAME = "audio-devlife" |
This file contains hidden or 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
| import audioread | |
| from google.cloud import speech | |
| from google.cloud.speech import enums | |
| from google.cloud.speech import types | |
| AUDIO_CHANNELS = 2 | |
| AUDIO_RATE = 16000 | |
| BLOB_PATH = "audio.flac" | |
| BUCKET_NAME = "audio-devlife" | |
| LANG_CODE = 'es-MX' |
This file contains hidden or 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
| from google.cloud import storage | |
| BUCKET_NAME = "audio-devlife" | |
| BLOB_PATH = "audio.flac" | |
| storage_client = storage.Client() | |
| bucket = storage_client.get_bucket(BUCKET_NAME) | |
| blob = bucket.blob(BLOB_PATH) | |
| with open(BLOB_PATH, "rb") as my_file: |
This file contains hidden or 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
| import youtube_dl | |
| ydl_opts = { | |
| "format": "bestaudio", | |
| "outtmpl": "%(title)s.%(ext)s", | |
| "postprocessors": [{ | |
| "key": "FFmpegExtractAudio", | |
| "preferredcodec": "flac", | |
| "preferredquality": "192", | |
| }], |
This file contains hidden or 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
| import re | |
| import youtube_dl | |
| import audioread | |
| from google.cloud import storage | |
| from google.cloud import speech | |
| from google.cloud.speech import enums | |
| from google.cloud.speech import types | |
| BUCKET_NAME = "audio-devlife" | |
| BLOB_PATH = "audio.flac" |