Dev - #5
Merged
Merged
Conversation
…h API configuration
…d adjust system prompt for clarity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds robust support for using cloud-based, OpenAI-compatible APIs for both text cleaning (disfluency removal) and transcription. It introduces new environment variables and configuration options, updates documentation, and implements backend logic to route requests to cloud providers when selected. The changes also improve the clarity of the text cleaning prompt and enhance workflow automation.
Cloud API integration and configuration:
cloudoption forLLM_PROVIDERandTRANSCRIPTION_PROVIDER. New environment variables (CLOUD_API_BASE_URL,CLOUD_API_KEY,TRANSCRIPTION_MODEL_NAME) enable flexible configuration. ([[1]](https://github.com/connorakey/openwhisper/pull/5/files#diff-361f2d0f55c49b270125820efb10f0d9433ced883e9d59b1f58c27b877dc2080L9-R25),[[2]](https://github.com/connorakey/openwhisper/pull/5/files#diff-8b801df796d0872b733d89acd897feeada5463acc50545adb56aa086048e46f5R6-R21),[[3]](https://github.com/connorakey/openwhisper/pull/5/files#diff-b57590968a12cee85a37c1b91d8cc7092cd8b68e50b242c39a178121db82a797L816-R859))docs/API.md) with detailed instructions and example configurations for using cloud providers, including benefits and considerations. ([[1]](https://github.com/connorakey/openwhisper/pull/5/files#diff-b57590968a12cee85a37c1b91d8cc7092cd8b68e50b242c39a178121db82a797L816-R859),[[2]](https://github.com/connorakey/openwhisper/pull/5/files#diff-b57590968a12cee85a37c1b91d8cc7092cd8b68e50b242c39a178121db82a797R952-R1078))Backend implementation:
text_cleaner.pyto support sending disfluency removal requests to cloud APIs, including handling API endpoints, authorization headers, and response parsing for OpenAI-compatible chat endpoints. The cleaning prompt was rewritten for clarity and specificity. ([[1]](https://github.com/connorakey/openwhisper/pull/5/files#diff-5d99e68f5b6f59488b8b75a2a0db33f538c8ef197616a29809becd99674f4faeR10-R45),[[2]](https://github.com/connorakey/openwhisper/pull/5/files#diff-5d99e68f5b6f59488b8b75a2a0db33f538c8ef197616a29809becd99674f4faeR55-R61),[[3]](https://github.com/connorakey/openwhisper/pull/5/files#diff-5d99e68f5b6f59488b8b75a2a0db33f538c8ef197616a29809becd99674f4faeL49-R88))transcription.pyto support cloud-based audio transcription using OpenAI-compatible APIs, with logic to select the provider based on environment configuration. ([[1]](https://github.com/connorakey/openwhisper/pull/5/files#diff-8b801df796d0872b733d89acd897feeada5463acc50545adb56aa086048e46f5R6-R21),[[2]](https://github.com/connorakey/openwhisper/pull/5/files#diff-8b801df796d0872b733d89acd897feeada5463acc50545adb56aa086048e46f5R53-R91))Dependency and workflow improvements:
requestslibrary to backend dependencies for HTTP requests to cloud APIs. ([backend/pyproject.tomlR12](https://github.com/connorakey/openwhisper/pull/5/files#diff-9f2cf60079756e94b31dbaeb145297215236d3c0135647163c2e51b80fd81551R12))[[1]](https://github.com/connorakey/openwhisper/pull/5/files#diff-4221e7060cb5692b5e8656f8f092468895f4bc8804397e8de7cb4cfdf8d95024R45),[[2]](https://github.com/connorakey/openwhisper/pull/5/files#diff-4221e7060cb5692b5e8656f8f092468895f4bc8804397e8de7cb4cfdf8d95024R73-R89))These changes enable flexible deployment scenarios, allowing users to leverage local or cloud resources for both LLM and transcription tasks, with comprehensive documentation and improved automation.