Skip to content

Python async client of Avasho API, TextToSpeech service of ivira.ai

License

Notifications You must be signed in to change notification settings

snosratiershad/aioavasho

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aioavasho

Python async client of Avasho API, TextToSpeech service of ivira.ai

Note: This is not an official client of Avasho or Sahab

Installation

Install aioavasho using pip:

$ pip install aioavasho

Usage Examples

Short Speech

import asyncio
import aioavasho


async def say_salam(
    avasho_client: aioavasho.AvashoClient, name: str
) -> aioavasho.ShortSpeechResponse:
    return await avasho_client.short_speech(
        f"سلام {name}", speaker=aioavasho.Speaker.BAHAR
    )


def main():
    loop: asyncio.AbstractEventLoop = asyncio.new_event_loop()
    avasho: aioavasho.AvashoClient = aioavasho.AvashoClient("TOKEN")
    salam: aioavasho.ShortSpeechResponse = loop.run_until_complete(
        say_salam(avasho, "سالار")
    )
    print(f"file path: {salam.get("filepath")}")


if __name__ == "__main__":
    main()

License

MIT License - see LICENSE file for details

About

Python async client of Avasho API, TextToSpeech service of ivira.ai

Topics

Resources

License

Stars

Watchers

Forks

Languages