Spaces:
Sleeping
Sleeping
Update functions.py
Browse files- functions.py +7 -7
functions.py
CHANGED
@@ -35,12 +35,12 @@ def get_transcribe_podcast(rss_url, local_path='podcast/'):
|
|
35 |
|
36 |
st.info("Starting Podcast Transcription Function...")
|
37 |
print("Feed URL: ", rss_url)
|
38 |
-
print("Local Path:", local_path)
|
39 |
|
40 |
|
41 |
# Download the podcast episode by parsing the RSS feed
|
42 |
-
p = Path(local_path)
|
43 |
-
p.mkdir(exist_ok=True)
|
44 |
|
45 |
st.info("Downloading the podcast episode...")
|
46 |
|
@@ -48,10 +48,10 @@ def get_transcribe_podcast(rss_url, local_path='podcast/'):
|
|
48 |
|
49 |
with requests.get(rss_url, stream=True) as r:
|
50 |
r.raise_for_status()
|
51 |
-
episode_path = p.joinpath(episode_name)
|
52 |
-
print(f'episode path {episode_path}')
|
53 |
|
54 |
-
with open(
|
55 |
for chunk in r.iter_content(chunk_size=8192):
|
56 |
f.write(chunk)
|
57 |
|
@@ -60,7 +60,7 @@ def get_transcribe_podcast(rss_url, local_path='podcast/'):
|
|
60 |
# Perform the transcription
|
61 |
st.info("Starting podcast transcription")
|
62 |
|
63 |
-
audio_file =
|
64 |
|
65 |
|
66 |
#Get size of audio file
|
|
|
35 |
|
36 |
st.info("Starting Podcast Transcription Function...")
|
37 |
print("Feed URL: ", rss_url)
|
38 |
+
# print("Local Path:", local_path)
|
39 |
|
40 |
|
41 |
# Download the podcast episode by parsing the RSS feed
|
42 |
+
# p = Path(local_path)
|
43 |
+
# p.mkdir(exist_ok=True)
|
44 |
|
45 |
st.info("Downloading the podcast episode...")
|
46 |
|
|
|
48 |
|
49 |
with requests.get(rss_url, stream=True) as r:
|
50 |
r.raise_for_status()
|
51 |
+
# episode_path = p.joinpath(episode_name)
|
52 |
+
# print(f'episode path {episode_path}')
|
53 |
|
54 |
+
with open(episode_name, 'wb') as f:
|
55 |
for chunk in r.iter_content(chunk_size=8192):
|
56 |
f.write(chunk)
|
57 |
|
|
|
60 |
# Perform the transcription
|
61 |
st.info("Starting podcast transcription")
|
62 |
|
63 |
+
audio_file = episode_name
|
64 |
|
65 |
|
66 |
#Get size of audio file
|