Skip to main content

Audion Python SDK - 간편하게 음성 AI 기능을 통합하기 위한 Python 클라이언트 라이브러리

Project description

음성 AI 구현의 복잡함을 없애고, 비즈니스 가능성을 확장하세요.

License Python version

Audion Python SDK

Repository: https://github.com/holamago/audion-python-sdk

목차

특징

  • 간편한 음성 AI 통합: 몇 줄의 코드로 강력한 음성 AI 기능을 애플리케이션에 추가
  • 다양한 입력 지원: 로컬 파일 및 URL을 통한 음성/비디오 처리
  • 광범위한 파일 형식: 주요 오디오 및 비디오 형식 지원
  • 유연한 Flow 시스템: 다양한 음성 AI 워크플로우 지원
  • 간단한 API: 직관적이고 사용하기 쉬운 Python 인터페이스

요구사항

설치

pip을 사용하여 설치 (PyPI 패키지 이름: audionlib):

pip install audionlib

또는 개발용으로 레포를 클론하여 editable 모드로 설치:

git clone https://github.com/holamago/audion-python-sdk.git
cd audion-python-sdk

python -m venv venv
source venv/bin/activate

pip install -e .

빠른 시작

1. 클라이언트 초기화

from audion import AudionClient

# API 키로 클라이언트 초기화
client = AudionClient(api_key="your-api-key-here")

2. 로컬 파일 처리

  • 오디오/비디오 업로드
# 로컬 오디오/비디오 파일 처리
result = client.flow(
    flow="audion_vu",
    input_type="file",
    input="path/to/your/audio.wav"
)
print(result)

3. URL 처리

# YouTube URL 처리
result = client.flow(
    flow="audion_vu",
    input_type="url",
    input="<https://youtu.be/your-video-id>"
)
print(result)

API 문서

AudionClient

Audion 서비스의 메인 클라이언트 클래스입니다.

초기화

AudionClient(
    api_key: str,           # 필수: API 인증 키
    base_url: str = None,   # 선택: 서버 기본 URL
    timeout: float = 300    # 선택: 요청 타임아웃 (초)
)

매개변수:

  • api_key (str, 필수): Audion 서비스 인증을 위한 API 키
  • base_url (str, 선택): 서버의 기본 URL. 기본값은 프로덕션 서버
  • timeout (float, 선택): HTTP 요청 타임아웃. 기본값은 300초

예외:

  • ValueError: api_key가 제공되지 않은 경우

메서드

flow(flow, input_type, input)

지정된 플로우로 음성/비디오 처리를 실행합니다.

client.flow(
    flow: str,        # 실행할 플로우 이름
    input_type: str,  # 입력 타입: "file" 또는 "url"
    input: str        # 파일 경로 또는 URL
)

매개변수:

  • flow (str): 실행할 플로우의 이름
    • 현재 지원하는 플로우:
      • audion_vu: Voice Understanding
      • audion_vh: Voice Highlight
    • Custom Flow 지원 가능 (email:contact@holamago.com)
  • input_type (str): 입력 타입. "file" 또는 "url"
  • input (str): 처리할 파일의 경로 또는 URL

반환값:

  • dict: 처리 결과를 포함하는 JSON 응답

예외:

  • ValueError: 지원하지 않는 input_type인 경우
  • Exception: API 호출 실패 시

지원 파일 형식

오디오 형식

  • .wav - WAV (Waveform Audio File Format)
  • .mp3 - MP3 (MPEG-1 Audio Layer III)
  • .m4a - M4A (MPEG-4 Audio)
  • .ogg - OGG (Ogg Vorbis)
  • .flac - FLAC (Free Lossless Audio Codec)
  • .aac - AAC (Advanced Audio Coding)
  • .wma - WMA (Windows Media Audio)
  • .m4b, .m4p, .m4r, .m4v - 기타 MPEG-4 오디오 형식

비디오 형식

  • .mp4 - MP4 (MPEG-4 Part 14)
  • .mov - MOV (QuickTime File Format)
  • .avi - AVI (Audio Video Interleave)
  • .mkv - MKV (Matroska Video)
  • .webm - WebM
  • .wmv - WMV (Windows Media Video)
  • .flv - FLV (Flash Video)
  • .mpeg, .mpg - MPEG (Moving Picture Experts Group)

지원하는 Flow

  • audion_vu: Voice Understanding - 음성 인식 및 분석
  • audion_vh: Voice Highlight - 주요 음성 구간 추출
  • Custom Flow도 지원 가능합니다 (contact@holamago.com)

문서

라이선스

이 프로젝트는 Apache License 2.0 하에 라이선스됩니다.

지원

버전 히스토리

  • v0.1.2

    • PyPI 패키지 구성 정리 (pyproject.toml 기반 빌드)
    • SDK 내부 구조 정리 (로그 유틸과 코어/헬퍼 모듈 리팩토링)
    • 문서 개선 (README 정리 및 예제 링크 정리)
  • v0.1.0

    • 초기 릴리스
    • 기본 flow API 지원
    • 파일 및 URL 입력 지원
    • 다중 오디오/비디오 형식 지원

Made with ❤️ by MAGO

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audionlib-0.1.2.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audionlib-0.1.2-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file audionlib-0.1.2.tar.gz.

File metadata

  • Download URL: audionlib-0.1.2.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for audionlib-0.1.2.tar.gz
Algorithm Hash digest
SHA256 43ce15ec9d218cd5050c3135127b0ad9b48114eca30b4ae4237ac36e47b9f1c7
MD5 57fa9fbc07754420ba75cb875e8ed1f7
BLAKE2b-256 d4e8eaae7edc5a95d34c88483a464bb44ec9319a1feb2ed2478efb3efe2bb783

See more details on using hashes here.

File details

Details for the file audionlib-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: audionlib-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for audionlib-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef4314b9264cf1f40c60293b0b2c81682331232404231c7a93d5a8851a948368
MD5 83047b8e32328312ade40582cd33bac8
BLAKE2b-256 97636d23a687b9be1abb53c04894f7b1f7892721af3be4380bde403b9d5d0d2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page