Skip to content

Commit a25a1cc

Browse files
committed
readme continous update
1 parent af50882 commit a25a1cc

2 files changed

Lines changed: 41 additions & 48 deletions

File tree

README.md

Lines changed: 39 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,66 @@
1-
# SLASHML Python client
1+
# SlashML Python client
2+
[SlashML](https://www.slashml.com/)
3+
# Introduction
4+
## Overview
5+
This is a Python client (SDK) for SlashML. It allows the user to use the apps available and active in [SlashML-Dashboard](https://www.slashml.com/dashboard).
6+
The apps can be together in the same code. For example, if the user wants to transcribe an audio file and get a summary, they can call speechtotext followed by summarization.
27

3-
This is a Python client for SLASHML. It lets you run transcription jobs from your Python code or Jupyter notebook. Do a transcription job with three lines of code
4-
```
5-
import speechtotext
8+
State-of-the-art AI models from several service providers are available. At SlashML, we also do the benchmarking on these models for the user. This will give them an idea of the best service provider for their application. For the full list of the available models thru SlashML, click [here](##availlable-service-providers)
69

7-
speect_to_text = speechtotext.SpeechToText()
8-
transcribe_id= speect_to_text.transcribe(audio_url,service_provider="aws")
9-
status=speect_to_text.status(transcribe_id,service_provider=service_provider)
1010

11-
```
12-
There is a daily limit (throttling) on the number of calls the user performs, transcription jobs can be done without specifying a token (API key). If the user intends on using the service more frequently, it is recommended to generate an token or API key from the dashboard @ [Slashml.com](https://www.slashml.com/).
1311

14-
Grab your token from [https://www.slashml.com/dashboard] (>settings> new api key) and authenticate by setting it as an environment variable (or when you initialize the service, see examples):
12+
to lets you run transcription jobs from your Python code or Jupyter notebook. The transcription can be done with three lines of code
1513
```
16-
export SLASHML_API_KEY=[token]
17-
```
18-
or including it in your code as follows:
19-
```
20-
import speechtotext
21-
API_KEY="your_api_key"
22-
speect_to_text = speechtotext.SpeechToText(API_KEY)
14+
import slashml
15+
16+
speect_to_text = slashml.SpeechToText()
2317
transcribe_id= speect_to_text.transcribe(audio_url,service_provider="aws")
2418
status=speect_to_text.status(transcribe_id,service_provider=service_provider)
2519
2620
```
2721

28-
-- update from this part, include examples, sign up, token, service providers, type of servies, benchmarking, link to pricing, Tutorial examples/examples
22+
## Set up and usage
23+
There is a daily limit (throttling) on the number of calls the user performs, the code runs without specifying a token (API key), the throttling kicks in and prevents new jobs after exceeding 10 calls per minute.
2924

25+
If the user intends on using the service more frequently, it is recommended to generate an token or API key from [SlashML-Dashboard](https://www.slashml.com/dashboard). This way, the throttling limit will increase.
3026

31-
SDK for SlashML documentation:
32-
- methods: upload_audio, transcribe, status
27+
Sign up and Grab your token from [SlashML-Dashboard](https://www.slashml.com/dashboard)>settings> new api key and authenticate by setting it as an environment variable (or when you initialize the service, see Quickstart tutorial):
3328

34-
Steps to Integrate
35-
1 - (Optional) Upload files where the data points to your audio file
29+
In your terminal
3630
```
37-
# call the class
38-
speect_to_text = speechtotext.SpeechToText()
39-
file_location="path/to/your/file.mp3"
40-
# when
41-
API_KEY="SLASH_ML_API_KEY"
42-
model_choice="assembly"
43-
result_upload = speect_to_text.upload_audio(file_location,API_KEY, model_choice)
44-
print(result_upload)
31+
export SLASHML_API_KEY=[token]
32+
```
33+
or including it in your python code as follows:
4534
```
46-
Save the upload_url. You can use this url link in the rest of the calls.
4735
36+
import os
37+
os.environ["SLASHML_API_KEY"] = "slashml_api_token"
4838
49-
2- Submit your audio file for transcription
5039
```
51-
upload_url=upload_url # you can skip step 1 and just input the accessible link of your # file)
5240

53-
result_transcribe = speect_to_text.transcribe(upload_url,API_KEY, model_choice)
41+
If the user preferes using the API calls directly, the documentation is available [here](https://www.slashml.com/dashboard).
42+
## Availlable service providers
5443

55-
print(result_transcribe)
56-
```
57-
Save the id in the response object.
44+
### Speech-to-text
5845

46+
AssemblyAI
47+
AWS
48+
Whisper (OpenAI)
5949

60-
3 - Check the status and get the text result of the transcription
61-
```
62-
job_id= id
63-
result_status = speect_to_text.status(job_id,API_KEY, model_choice=model_choice)
50+
### Summarization
51+
hugging-face summarization based on Meta... include links
52+
# Quickstart tutorial
6453

65-
### get the full details of the result
66-
print(result_status)
67-
### get the text reulst only
68-
print(json.loads(result)["text"])
69-
```
54+
## Introduction
55+
56+
### Start with initializing the service
57+
58+
### Specify your service provider
59+
60+
In this step, benchmarking will help you decide which service provider is the best for you.
61+
For speech-to-text: "assembly", "aws", "whisper"
62+
For summarization: "hugging-face", "openai"
7063

7164

7265
et voilà, Next steps:
7366
- pip install slashml
74-
- add SLASH_API_KEY to sys path

src/test_speechtotext_1.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
#API KEY (optional)
55

66
# set environment path
7+
import os
78
os.environ["SLASHML_API_KEY"] = "0d91bfede9c5c9de6ff1d5610ef71c3b6d5be9ee"
89
# Initialize SlashML
910
speect_to_text = slashml.SpeechToText()
1011
# optional local file to upload, if not an accessible url
1112
file_location="/Users/JJneid/Desktop/SlashMl/Benchmarking/podcast1/podcast1_long_trim.mp3"
1213
# If your audio files aren't accessible via a URL already, you can upload your audio file using this API
1314
upload_url= speect_to_text.upload_audio(file_location)
14-
# choose your service provider: "asembly", "aws", "whisper"
15+
# choose your service provider: "assembly", "aws", "whisper"
1516
service_provider="aws"
1617
# transcribe
1718
transcribe_id= speect_to_text.transcribe(upload_url,service_provider)

0 commit comments

Comments
 (0)