all AI news
I am trying to understand this snippet of code that does language detection from the OpenAi whisper model. I am trying my best to understand this code, but I am struggling. I think they use a mask and use logistic regression to find the probability o
Oct. 6, 2022, 12:25 a.m. | /u/OkVariation3880
Natural Language Processing www.reddit.com
from dataclasses import dataclass, field
from typing import Dict, List, Tuple, Iterable, Optional, Sequence, Union, TYPE_CHECKING
import numpy as np
import torch
import torch.nn.functional as F
from torch import Tensor
from torch.distributions import Categorical
from .audio import CHUNK_LENGTH
from .tokenizer import Tokenizer, get_tokenizer
from .utils import compression_ratio
if TYPE_CHECKING:
from .model import Whisper
@torch.no_grad()
def detect_language(model: "Whisper", mel: Tensor, tokenizer: Tokenizer = None) -> Tuple[Tensor, List[dict]]:
"""
Detect the spoken language in the audio, and return them as list …
code detection language languagetechnology logistic regression openai probability regression think whisper
More from www.reddit.com / Natural Language Processing
What Do You Love About NLP?
1 day, 3 hours ago |
www.reddit.com
How to Install and Deploy LLaMA 3 Into Production
1 day, 20 hours ago |
www.reddit.com
The Languages AI Is Leaving Behind
4 days, 19 hours ago |
www.reddit.com
Feeling so inferior in the NLP job market.
5 days, 16 hours ago |
www.reddit.com
NLP: building a sentiment model
5 days, 17 hours ago |
www.reddit.com
ReFT: Representation Finetuning for Language Models
1 week, 6 days ago |
www.reddit.com
Jobs in AI, ML, Big Data
Data Architect
@ University of Texas at Austin | Austin, TX
Data ETL Engineer
@ University of Texas at Austin | Austin, TX
Lead GNSS Data Scientist
@ Lurra Systems | Melbourne
Senior Machine Learning Engineer (MLOps)
@ Promaton | Remote, Europe
Stagista Technical Data Engineer
@ Hager Group | BRESCIA, IT
Data Analytics - SAS, SQL - Associate
@ JPMorgan Chase & Co. | Mumbai, Maharashtra, India