SpireLab commited on
Commit
b4b9534
·
verified ·
1 Parent(s): 8017cce

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -148,14 +148,16 @@ import requests
148
  base_url = 'http://localhost:8080/Get_Inference'
149
 
150
  # Set up the query parameters
 
 
151
  params = {
152
  'text': 'ಮಾದರಿಯು ಸರಿಯಾಗಿ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತಿದೆಯೇ ಎಂದು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಲು ಬಳಸಲಾಗುವ ಪರೀಕ್ಷಾ ವಾಕ್ಯ ಇದು.',
153
  'lang': 'kannada',
154
- 'speaker_wav': AudioFile
155
  }
156
 
157
  # Send the GET request
158
- response = requests.get(base_url, params=params)
 
159
 
160
  # Check if the request was successful
161
  if response.status_code == 200:
 
148
  base_url = 'http://localhost:8080/Get_Inference'
149
 
150
  # Set up the query parameters
151
+ WavPath = 'path/to/wavfile.wav'
152
+
153
  params = {
154
  'text': 'ಮಾದರಿಯು ಸರಿಯಾಗಿ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತಿದೆಯೇ ಎಂದು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಲು ಬಳಸಲಾಗುವ ಪರೀಕ್ಷಾ ವಾಕ್ಯ ಇದು.',
155
  'lang': 'kannada',
 
156
  }
157
 
158
  # Send the GET request
159
+ with open(WavPath, "rb") as AudioFile:
160
+ response = requests.get(base_url, params = params, files = { 'speaker_wav': AudioFile.read() })
161
 
162
  # Check if the request was successful
163
  if response.status_code == 200: